Skip to content

Commit

Permalink
Update other SQL engine snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Nov 21, 2024
1 parent 6d8676d commit bcc895d
Show file tree
Hide file tree
Showing 36 changed files with 4,664 additions and 4,106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ FROM (
SELECT
subq_6.ds AS metric_time__day
FROM ***************************.mf_time_spine subq_6
WHERE subq_6.ds BETWEEN '2019-12-19' AND '2020-01-02'
) subq_5
INNER JOIN (
-- Join Self Over Time Range
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@ FROM (
-- Aggregate Measures
-- Compute Metrics via Expressions
SELECT
subq_17.metric_time__day AS metric_time__day
subq_18.ds AS metric_time__day
, COUNT(DISTINCT subq_16.bookers) AS every_2_days_bookers_2_days_ago
FROM (
-- Time Spine
SELECT
ds AS metric_time__day
FROM ***************************.mf_time_spine subq_18
WHERE ds BETWEEN '2019-12-19' AND '2020-01-02'
) subq_17
FROM ***************************.mf_time_spine subq_18
INNER JOIN (
-- Join Self Over Time Range
SELECT
Expand All @@ -38,8 +32,8 @@ FROM (
)
) subq_16
ON
DATE_SUB(CAST(subq_17.metric_time__day AS DATETIME), INTERVAL 2 day) = subq_16.metric_time__day
WHERE subq_17.metric_time__day BETWEEN '2019-12-19' AND '2020-01-02'
DATE_SUB(CAST(subq_18.ds AS DATETIME), INTERVAL 2 day) = subq_16.metric_time__day
WHERE subq_18.ds BETWEEN '2019-12-19' AND '2020-01-02'
GROUP BY
metric_time__day
) subq_23

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@ SELECT
, 2 * bookings_offset_once AS bookings_offset_twice
FROM (
-- Join to Time Spine Dataset
-- Constrain Time Range to [2020-01-12T00:00:00, 2020-01-13T00:00:00]
SELECT
subq_21.metric_time__day AS metric_time__day
, subq_20.bookings_offset_once AS bookings_offset_once
FROM (
-- Time Spine
SELECT
ds AS metric_time__day
FROM ***************************.mf_time_spine subq_22
WHERE ds BETWEEN '2020-01-12' AND '2020-01-13'
) subq_21
subq_23.ds AS metric_time__day
, subq_21.bookings_offset_once AS bookings_offset_once
FROM ***************************.mf_time_spine subq_23
INNER JOIN (
-- Compute Metrics via Expressions
SELECT
Expand All @@ -29,23 +24,24 @@ FROM (
-- Aggregate Measures
-- Compute Metrics via Expressions
SELECT
subq_15.ds AS metric_time__day
, SUM(subq_13.bookings) AS bookings
FROM ***************************.mf_time_spine subq_15
subq_16.ds AS metric_time__day
, SUM(subq_14.bookings) AS bookings
FROM ***************************.mf_time_spine subq_16
INNER JOIN (
-- Read Elements From Semantic Model 'bookings_source'
-- Metric Time Dimension 'ds'
SELECT
DATETIME_TRUNC(ds, day) AS metric_time__day
, 1 AS bookings
FROM ***************************.fct_bookings bookings_source_src_28000
) subq_13
) subq_14
ON
DATE_SUB(CAST(subq_15.ds AS DATETIME), INTERVAL 5 day) = subq_13.metric_time__day
DATE_SUB(CAST(subq_16.ds AS DATETIME), INTERVAL 5 day) = subq_14.metric_time__day
GROUP BY
metric_time__day
) subq_19
) subq_20
) subq_20
) subq_21
ON
DATE_SUB(CAST(subq_21.metric_time__day AS DATETIME), INTERVAL 2 day) = subq_20.metric_time__day
) subq_23
DATE_SUB(CAST(subq_23.ds AS DATETIME), INTERVAL 2 day) = subq_21.metric_time__day
WHERE subq_23.ds BETWEEN '2020-01-12' AND '2020-01-13'
) subq_25
Loading

0 comments on commit bcc895d

Please sign in to comment.