Skip to content

Commit

Permalink
Update snapshots for other SQL engines
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Nov 21, 2024
1 parent a29e94a commit d4c5482
Show file tree
Hide file tree
Showing 210 changed files with 2,688 additions and 2,688 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ sql_engine: BigQuery
---
-- Re-aggregate Metric via Group By
SELECT
subq_11.metric_time__week
, subq_11.booking__ds__month
subq_11.booking__ds__month
, subq_11.metric_time__week
, subq_11.every_two_days_bookers_fill_nulls_with_0
FROM (
-- Window Function for Metric Re-aggregation
SELECT
subq_10.metric_time__week
, subq_10.booking__ds__month
subq_10.booking__ds__month
, subq_10.metric_time__week
, FIRST_VALUE(subq_10.every_two_days_bookers_fill_nulls_with_0) OVER (
PARTITION BY
subq_10.metric_time__week
, subq_10.booking__ds__month
subq_10.booking__ds__month
, subq_10.metric_time__week
ORDER BY subq_10.metric_time__day
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Compute Metrics via Expressions
SELECT
subq_9.metric_time__day
subq_9.booking__ds__month
, subq_9.metric_time__day
, subq_9.metric_time__week
, subq_9.booking__ds__month
, COALESCE(subq_9.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Join to Time Spine Dataset
SELECT
subq_7.metric_time__day AS metric_time__day
DATETIME_TRUNC(subq_7.metric_time__day, month) AS booking__ds__month
, subq_7.metric_time__day AS metric_time__day
, DATETIME_TRUNC(subq_7.metric_time__day, isoweek) AS metric_time__week
, subq_6.booking__ds__month AS booking__ds__month
, subq_6.bookers AS bookers
FROM (
-- Time Spine
Expand Down Expand Up @@ -380,6 +380,6 @@ FROM (
) subq_10
) subq_11
GROUP BY
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, every_two_days_bookers_fill_nulls_with_0
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ sql_engine: BigQuery
---
-- Re-aggregate Metric via Group By
SELECT
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, every_two_days_bookers_fill_nulls_with_0
FROM (
-- Compute Metrics via Expressions
-- Window Function for Metric Re-aggregation
SELECT
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, FIRST_VALUE(COALESCE(bookers, 0)) OVER (
PARTITION BY
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
ORDER BY metric_time__day
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Join to Time Spine Dataset
SELECT
subq_20.ds AS metric_time__day
DATETIME_TRUNC(subq_20.ds, month) AS booking__ds__month
, subq_20.ds AS metric_time__day
, DATETIME_TRUNC(subq_20.ds, isoweek) AS metric_time__week
, subq_18.booking__ds__month AS booking__ds__month
, subq_18.bookers AS bookers
FROM ***************************.mf_time_spine subq_20
LEFT OUTER JOIN (
Expand Down Expand Up @@ -60,6 +60,6 @@ FROM (
) subq_21
) subq_23
GROUP BY
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, every_two_days_bookers_fill_nulls_with_0
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ sql_engine: Databricks
---
-- Re-aggregate Metric via Group By
SELECT
subq_11.metric_time__week
, subq_11.booking__ds__month
subq_11.booking__ds__month
, subq_11.metric_time__week
, subq_11.every_two_days_bookers_fill_nulls_with_0
FROM (
-- Window Function for Metric Re-aggregation
SELECT
subq_10.metric_time__week
, subq_10.booking__ds__month
subq_10.booking__ds__month
, subq_10.metric_time__week
, FIRST_VALUE(subq_10.every_two_days_bookers_fill_nulls_with_0) OVER (
PARTITION BY
subq_10.metric_time__week
, subq_10.booking__ds__month
subq_10.booking__ds__month
, subq_10.metric_time__week
ORDER BY subq_10.metric_time__day
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Compute Metrics via Expressions
SELECT
subq_9.metric_time__day
subq_9.booking__ds__month
, subq_9.metric_time__day
, subq_9.metric_time__week
, subq_9.booking__ds__month
, COALESCE(subq_9.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Join to Time Spine Dataset
SELECT
subq_7.metric_time__day AS metric_time__day
DATE_TRUNC('month', subq_7.metric_time__day) AS booking__ds__month
, subq_7.metric_time__day AS metric_time__day
, DATE_TRUNC('week', subq_7.metric_time__day) AS metric_time__week
, subq_6.booking__ds__month AS booking__ds__month
, subq_6.bookers AS bookers
FROM (
-- Time Spine
Expand Down Expand Up @@ -380,6 +380,6 @@ FROM (
) subq_10
) subq_11
GROUP BY
subq_11.metric_time__week
, subq_11.booking__ds__month
subq_11.booking__ds__month
, subq_11.metric_time__week
, subq_11.every_two_days_bookers_fill_nulls_with_0
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ sql_engine: Databricks
---
-- Re-aggregate Metric via Group By
SELECT
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, every_two_days_bookers_fill_nulls_with_0
FROM (
-- Compute Metrics via Expressions
-- Window Function for Metric Re-aggregation
SELECT
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, FIRST_VALUE(COALESCE(bookers, 0)) OVER (
PARTITION BY
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
ORDER BY metric_time__day
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Join to Time Spine Dataset
SELECT
subq_20.ds AS metric_time__day
DATE_TRUNC('month', subq_20.ds) AS booking__ds__month
, subq_20.ds AS metric_time__day
, DATE_TRUNC('week', subq_20.ds) AS metric_time__week
, subq_18.booking__ds__month AS booking__ds__month
, subq_18.bookers AS bookers
FROM ***************************.mf_time_spine subq_20
LEFT OUTER JOIN (
Expand Down Expand Up @@ -60,6 +60,6 @@ FROM (
) subq_21
) subq_23
GROUP BY
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, every_two_days_bookers_fill_nulls_with_0
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ sql_engine: Postgres
---
-- Re-aggregate Metric via Group By
SELECT
subq_11.metric_time__week
, subq_11.booking__ds__month
subq_11.booking__ds__month
, subq_11.metric_time__week
, subq_11.every_two_days_bookers_fill_nulls_with_0
FROM (
-- Window Function for Metric Re-aggregation
SELECT
subq_10.metric_time__week
, subq_10.booking__ds__month
subq_10.booking__ds__month
, subq_10.metric_time__week
, FIRST_VALUE(subq_10.every_two_days_bookers_fill_nulls_with_0) OVER (
PARTITION BY
subq_10.metric_time__week
, subq_10.booking__ds__month
subq_10.booking__ds__month
, subq_10.metric_time__week
ORDER BY subq_10.metric_time__day
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Compute Metrics via Expressions
SELECT
subq_9.metric_time__day
subq_9.booking__ds__month
, subq_9.metric_time__day
, subq_9.metric_time__week
, subq_9.booking__ds__month
, COALESCE(subq_9.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Join to Time Spine Dataset
SELECT
subq_7.metric_time__day AS metric_time__day
DATE_TRUNC('month', subq_7.metric_time__day) AS booking__ds__month
, subq_7.metric_time__day AS metric_time__day
, DATE_TRUNC('week', subq_7.metric_time__day) AS metric_time__week
, subq_6.booking__ds__month AS booking__ds__month
, subq_6.bookers AS bookers
FROM (
-- Time Spine
Expand Down Expand Up @@ -380,6 +380,6 @@ FROM (
) subq_10
) subq_11
GROUP BY
subq_11.metric_time__week
, subq_11.booking__ds__month
subq_11.booking__ds__month
, subq_11.metric_time__week
, subq_11.every_two_days_bookers_fill_nulls_with_0
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ sql_engine: Postgres
---
-- Re-aggregate Metric via Group By
SELECT
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, every_two_days_bookers_fill_nulls_with_0
FROM (
-- Compute Metrics via Expressions
-- Window Function for Metric Re-aggregation
SELECT
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, FIRST_VALUE(COALESCE(bookers, 0)) OVER (
PARTITION BY
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
ORDER BY metric_time__day
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Join to Time Spine Dataset
SELECT
subq_20.ds AS metric_time__day
DATE_TRUNC('month', subq_20.ds) AS booking__ds__month
, subq_20.ds AS metric_time__day
, DATE_TRUNC('week', subq_20.ds) AS metric_time__week
, subq_18.booking__ds__month AS booking__ds__month
, subq_18.bookers AS bookers
FROM ***************************.mf_time_spine subq_20
LEFT OUTER JOIN (
Expand Down Expand Up @@ -60,6 +60,6 @@ FROM (
) subq_21
) subq_23
GROUP BY
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, every_two_days_bookers_fill_nulls_with_0
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ sql_engine: Redshift
---
-- Re-aggregate Metric via Group By
SELECT
subq_11.metric_time__week
, subq_11.booking__ds__month
subq_11.booking__ds__month
, subq_11.metric_time__week
, subq_11.every_two_days_bookers_fill_nulls_with_0
FROM (
-- Window Function for Metric Re-aggregation
SELECT
subq_10.metric_time__week
, subq_10.booking__ds__month
subq_10.booking__ds__month
, subq_10.metric_time__week
, FIRST_VALUE(subq_10.every_two_days_bookers_fill_nulls_with_0) OVER (
PARTITION BY
subq_10.metric_time__week
, subq_10.booking__ds__month
subq_10.booking__ds__month
, subq_10.metric_time__week
ORDER BY subq_10.metric_time__day
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Compute Metrics via Expressions
SELECT
subq_9.metric_time__day
subq_9.booking__ds__month
, subq_9.metric_time__day
, subq_9.metric_time__week
, subq_9.booking__ds__month
, COALESCE(subq_9.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Join to Time Spine Dataset
SELECT
subq_7.metric_time__day AS metric_time__day
DATE_TRUNC('month', subq_7.metric_time__day) AS booking__ds__month
, subq_7.metric_time__day AS metric_time__day
, DATE_TRUNC('week', subq_7.metric_time__day) AS metric_time__week
, subq_6.booking__ds__month AS booking__ds__month
, subq_6.bookers AS bookers
FROM (
-- Time Spine
Expand Down Expand Up @@ -380,6 +380,6 @@ FROM (
) subq_10
) subq_11
GROUP BY
subq_11.metric_time__week
, subq_11.booking__ds__month
subq_11.booking__ds__month
, subq_11.metric_time__week
, subq_11.every_two_days_bookers_fill_nulls_with_0
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ sql_engine: Redshift
---
-- Re-aggregate Metric via Group By
SELECT
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, every_two_days_bookers_fill_nulls_with_0
FROM (
-- Compute Metrics via Expressions
-- Window Function for Metric Re-aggregation
SELECT
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, FIRST_VALUE(COALESCE(bookers, 0)) OVER (
PARTITION BY
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
ORDER BY metric_time__day
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Join to Time Spine Dataset
SELECT
subq_20.ds AS metric_time__day
DATE_TRUNC('month', subq_20.ds) AS booking__ds__month
, subq_20.ds AS metric_time__day
, DATE_TRUNC('week', subq_20.ds) AS metric_time__week
, subq_18.booking__ds__month AS booking__ds__month
, subq_18.bookers AS bookers
FROM ***************************.mf_time_spine subq_20
LEFT OUTER JOIN (
Expand Down Expand Up @@ -60,6 +60,6 @@ FROM (
) subq_21
) subq_23
GROUP BY
metric_time__week
, booking__ds__month
booking__ds__month
, metric_time__week
, every_two_days_bookers_fill_nulls_with_0
Loading

0 comments on commit d4c5482

Please sign in to comment.