Skip to content

Commit

Permalink
[sql 208/208] chore(snowflake): regen other sql
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and kszucs committed Dec 21, 2023
1 parent cabd7e8 commit 72186df
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM (
SELECT
"t1"."street" AS "street",
ROW_NUMBER() OVER (ORDER BY "t1"."street" ASC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) - 1 AS "key",
"t2"."key" AS "key_right"
"t3"."key" AS "key_right"
FROM (
SELECT
"t0"."street" AS "street",
Expand All @@ -22,8 +22,8 @@ FROM (
ROW_NUMBER() OVER (ORDER BY "t0"."street" ASC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) - 1 AS "key"
FROM "data" AS "t0"
) AS "t1"
) AS "t2"
ON "t1"."key" = "t2"."key"
) AS "t3"
ON "t1"."key" = "t3"."key"
) AS "t5"
INNER JOIN (
SELECT
Expand All @@ -32,7 +32,7 @@ INNER JOIN (
SELECT
"t1"."street" AS "street",
ROW_NUMBER() OVER (ORDER BY "t1"."street" ASC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) - 1 AS "key",
"t2"."key" AS "key_right"
"t3"."key" AS "key_right"
FROM (
SELECT
"t0"."street" AS "street",
Expand All @@ -48,8 +48,8 @@ INNER JOIN (
ROW_NUMBER() OVER (ORDER BY "t0"."street" ASC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) - 1 AS "key"
FROM "data" AS "t0"
) AS "t1"
) AS "t2"
ON "t1"."key" = "t2"."key"
) AS "t3"
ON "t1"."key" = "t3"."key"
) AS "t5"
) AS "t6"
ON "t5"."key" = "t6"."key"
) AS "t7"
ON "t5"."key" = "t7"."key"
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
SELECT
"t1"."key" AS "key",
"t2"."key" AS "key_right",
"t4"."key_right" AS "key_right_right"
"t5"."key_right" AS "key_right_right"
FROM (
SELECT
*
"t0"."key" AS "key"
FROM "leaf" AS "t0"
WHERE
TRUE
) AS "t1"
INNER JOIN (
SELECT
"t1"."key" AS "key"
FROM (
SELECT
*
FROM "leaf" AS "t0"
WHERE
TRUE
) AS "t1"
"t0"."key" AS "key"
FROM "leaf" AS "t0"
WHERE
TRUE
) AS "t2"
ON "t1"."key" = "t2"."key"
INNER JOIN (
Expand All @@ -27,22 +23,18 @@ INNER JOIN (
"t2"."key" AS "key_right"
FROM (
SELECT
*
"t0"."key" AS "key"
FROM "leaf" AS "t0"
WHERE
TRUE
) AS "t1"
INNER JOIN (
SELECT
"t1"."key" AS "key"
FROM (
SELECT
*
FROM "leaf" AS "t0"
WHERE
TRUE
) AS "t1"
"t0"."key" AS "key"
FROM "leaf" AS "t0"
WHERE
TRUE
) AS "t2"
ON "t1"."key" = "t2"."key"
) AS "t4"
ON "t1"."key" = "t1"."key"
) AS "t5"
ON "t1"."key" = "t5"."key"
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
SELECT
"t0"."x" IN ((
SELECT
"t1"."x" AS "x"
FROM (
SELECT
*
FROM "t" AS "t0"
WHERE
(
"t0"."x" > 2
)
) AS "t1"
"t0"."x" AS "x"
FROM "t" AS "t0"
WHERE
"t0"."x" > 2
)) AS "InSubquery(x)"
FROM "t" AS "t0"

0 comments on commit 72186df

Please sign in to comment.