Skip to content

Commit

Permalink
Update snapshots for other engines
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Dec 20, 2024
1 parent d5f5351 commit 75d0e42
Show file tree
Hide file tree
Showing 160 changed files with 586 additions and 586 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,47 @@ sql_engine: BigQuery
---
-- Re-aggregate Metric via Group By
SELECT
subq_12.booking__ds__month
, subq_12.metric_time__week
subq_12.metric_time__week
, subq_12.booking__ds__month
, subq_12.every_two_days_bookers_fill_nulls_with_0
FROM (
-- Window Function for Metric Re-aggregation
SELECT
subq_11.booking__ds__month
, subq_11.metric_time__week
subq_11.metric_time__week
, subq_11.booking__ds__month
, FIRST_VALUE(subq_11.every_two_days_bookers_fill_nulls_with_0) OVER (
PARTITION BY
subq_11.booking__ds__month
, subq_11.metric_time__week
subq_11.metric_time__week
, subq_11.booking__ds__month
ORDER BY subq_11.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_10.booking__ds__month
subq_10.metric_time__day
, subq_10.metric_time__week
, subq_10.metric_time__day
, subq_10.booking__ds__month
, COALESCE(subq_10.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Join to Time Spine Dataset
SELECT
subq_9.booking__ds__month AS booking__ds__month
subq_9.metric_time__day AS metric_time__day
, subq_9.metric_time__week AS metric_time__week
, subq_9.metric_time__day AS metric_time__day
, subq_9.booking__ds__month AS booking__ds__month
, subq_6.bookers AS bookers
FROM (
-- Pass Only Elements: ['booking__ds__month', 'metric_time__week', 'metric_time__day']
SELECT
subq_8.booking__ds__month
subq_8.metric_time__day
, subq_8.metric_time__week
, subq_8.metric_time__day
, subq_8.booking__ds__month
FROM (
-- Change Column Aliases
SELECT
subq_7.ds__month AS booking__ds__month
subq_7.ds__day AS metric_time__day
, subq_7.ds__week AS metric_time__week
, subq_7.ds__day AS metric_time__day
, subq_7.ds__month AS booking__ds__month
, subq_7.ds__quarter
, subq_7.ds__year
, subq_7.ds__extract_year
Expand Down Expand Up @@ -414,6 +414,6 @@ FROM (
) subq_11
) subq_12
GROUP BY
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
, 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
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
, every_two_days_bookers_fill_nulls_with_0
FROM (
-- Compute Metrics via Expressions
-- Window Function for Metric Re-aggregation
SELECT
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
, FIRST_VALUE(COALESCE(bookers, 0)) OVER (
PARTITION BY
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
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
DATETIME_TRUNC(time_spine_src_28006.ds, month) AS booking__ds__month
time_spine_src_28006.ds AS metric_time__day
, DATETIME_TRUNC(time_spine_src_28006.ds, isoweek) AS metric_time__week
, time_spine_src_28006.ds AS metric_time__day
, DATETIME_TRUNC(time_spine_src_28006.ds, month) AS booking__ds__month
, subq_19.bookers AS bookers
FROM ***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN (
Expand Down Expand Up @@ -60,6 +60,6 @@ FROM (
) subq_23
) subq_25
GROUP BY
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
, every_two_days_bookers_fill_nulls_with_0
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,47 @@ sql_engine: Databricks
---
-- Re-aggregate Metric via Group By
SELECT
subq_12.booking__ds__month
, subq_12.metric_time__week
subq_12.metric_time__week
, subq_12.booking__ds__month
, subq_12.every_two_days_bookers_fill_nulls_with_0
FROM (
-- Window Function for Metric Re-aggregation
SELECT
subq_11.booking__ds__month
, subq_11.metric_time__week
subq_11.metric_time__week
, subq_11.booking__ds__month
, FIRST_VALUE(subq_11.every_two_days_bookers_fill_nulls_with_0) OVER (
PARTITION BY
subq_11.booking__ds__month
, subq_11.metric_time__week
subq_11.metric_time__week
, subq_11.booking__ds__month
ORDER BY subq_11.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_10.booking__ds__month
subq_10.metric_time__day
, subq_10.metric_time__week
, subq_10.metric_time__day
, subq_10.booking__ds__month
, COALESCE(subq_10.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Join to Time Spine Dataset
SELECT
subq_9.booking__ds__month AS booking__ds__month
subq_9.metric_time__day AS metric_time__day
, subq_9.metric_time__week AS metric_time__week
, subq_9.metric_time__day AS metric_time__day
, subq_9.booking__ds__month AS booking__ds__month
, subq_6.bookers AS bookers
FROM (
-- Pass Only Elements: ['booking__ds__month', 'metric_time__week', 'metric_time__day']
SELECT
subq_8.booking__ds__month
subq_8.metric_time__day
, subq_8.metric_time__week
, subq_8.metric_time__day
, subq_8.booking__ds__month
FROM (
-- Change Column Aliases
SELECT
subq_7.ds__month AS booking__ds__month
subq_7.ds__day AS metric_time__day
, subq_7.ds__week AS metric_time__week
, subq_7.ds__day AS metric_time__day
, subq_7.ds__month AS booking__ds__month
, subq_7.ds__quarter
, subq_7.ds__year
, subq_7.ds__extract_year
Expand Down Expand Up @@ -414,6 +414,6 @@ FROM (
) subq_11
) subq_12
GROUP BY
subq_12.booking__ds__month
, subq_12.metric_time__week
subq_12.metric_time__week
, subq_12.booking__ds__month
, subq_12.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
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
, every_two_days_bookers_fill_nulls_with_0
FROM (
-- Compute Metrics via Expressions
-- Window Function for Metric Re-aggregation
SELECT
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
, FIRST_VALUE(COALESCE(bookers, 0)) OVER (
PARTITION BY
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
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
DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month
time_spine_src_28006.ds AS metric_time__day
, DATE_TRUNC('week', time_spine_src_28006.ds) AS metric_time__week
, time_spine_src_28006.ds AS metric_time__day
, DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month
, subq_19.bookers AS bookers
FROM ***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN (
Expand Down Expand Up @@ -60,6 +60,6 @@ FROM (
) subq_23
) subq_25
GROUP BY
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
, every_two_days_bookers_fill_nulls_with_0
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,47 @@ sql_engine: Postgres
---
-- Re-aggregate Metric via Group By
SELECT
subq_12.booking__ds__month
, subq_12.metric_time__week
subq_12.metric_time__week
, subq_12.booking__ds__month
, subq_12.every_two_days_bookers_fill_nulls_with_0
FROM (
-- Window Function for Metric Re-aggregation
SELECT
subq_11.booking__ds__month
, subq_11.metric_time__week
subq_11.metric_time__week
, subq_11.booking__ds__month
, FIRST_VALUE(subq_11.every_two_days_bookers_fill_nulls_with_0) OVER (
PARTITION BY
subq_11.booking__ds__month
, subq_11.metric_time__week
subq_11.metric_time__week
, subq_11.booking__ds__month
ORDER BY subq_11.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_10.booking__ds__month
subq_10.metric_time__day
, subq_10.metric_time__week
, subq_10.metric_time__day
, subq_10.booking__ds__month
, COALESCE(subq_10.bookers, 0) AS every_two_days_bookers_fill_nulls_with_0
FROM (
-- Join to Time Spine Dataset
SELECT
subq_9.booking__ds__month AS booking__ds__month
subq_9.metric_time__day AS metric_time__day
, subq_9.metric_time__week AS metric_time__week
, subq_9.metric_time__day AS metric_time__day
, subq_9.booking__ds__month AS booking__ds__month
, subq_6.bookers AS bookers
FROM (
-- Pass Only Elements: ['booking__ds__month', 'metric_time__week', 'metric_time__day']
SELECT
subq_8.booking__ds__month
subq_8.metric_time__day
, subq_8.metric_time__week
, subq_8.metric_time__day
, subq_8.booking__ds__month
FROM (
-- Change Column Aliases
SELECT
subq_7.ds__month AS booking__ds__month
subq_7.ds__day AS metric_time__day
, subq_7.ds__week AS metric_time__week
, subq_7.ds__day AS metric_time__day
, subq_7.ds__month AS booking__ds__month
, subq_7.ds__quarter
, subq_7.ds__year
, subq_7.ds__extract_year
Expand Down Expand Up @@ -414,6 +414,6 @@ FROM (
) subq_11
) subq_12
GROUP BY
subq_12.booking__ds__month
, subq_12.metric_time__week
subq_12.metric_time__week
, subq_12.booking__ds__month
, subq_12.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
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
, every_two_days_bookers_fill_nulls_with_0
FROM (
-- Compute Metrics via Expressions
-- Window Function for Metric Re-aggregation
SELECT
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
, FIRST_VALUE(COALESCE(bookers, 0)) OVER (
PARTITION BY
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
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
DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month
time_spine_src_28006.ds AS metric_time__day
, DATE_TRUNC('week', time_spine_src_28006.ds) AS metric_time__week
, time_spine_src_28006.ds AS metric_time__day
, DATE_TRUNC('month', time_spine_src_28006.ds) AS booking__ds__month
, subq_19.bookers AS bookers
FROM ***************************.mf_time_spine time_spine_src_28006
LEFT OUTER JOIN (
Expand Down Expand Up @@ -60,6 +60,6 @@ FROM (
) subq_23
) subq_25
GROUP BY
booking__ds__month
, metric_time__week
metric_time__week
, booking__ds__month
, every_two_days_bookers_fill_nulls_with_0
Loading

0 comments on commit 75d0e42

Please sign in to comment.