Skip to content

Commit

Permalink
Update SQL engine snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Apr 29, 2024
1 parent bcdcd87 commit 6f8b6c4
Show file tree
Hide file tree
Showing 10 changed files with 2,480 additions and 0 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-- Constrain Output with WHERE
-- Pass Only Elements: ['bookers',]
-- Aggregate Measures
-- Compute Metrics via Expressions
SELECT
COUNT(DISTINCT bookers) AS bookers
FROM (
-- Join Standard Outputs
-- Pass Only Elements: ['bookers', 'guest__bookers']
SELECT
subq_26.bookers AS guest__bookers
, subq_20.bookers AS bookers
FROM (
-- Read Elements From Semantic Model 'bookings_source'
-- Metric Time Dimension 'ds'
-- Pass Only Elements: ['bookers', 'guest']
SELECT
guest_id AS guest
, guest_id AS bookers
FROM ***************************.fct_bookings bookings_source_src_28000
) subq_20
LEFT OUTER JOIN (
-- Read Elements From Semantic Model 'bookings_source'
-- Metric Time Dimension 'ds'
-- Pass Only Elements: ['bookers', 'guest']
-- Aggregate Measures
-- Compute Metrics via Expressions
-- Pass Only Elements: ['guest', 'bookers']
SELECT
guest_id AS guest
, COUNT(DISTINCT guest_id) AS bookers
FROM ***************************.fct_bookings bookings_source_src_28000
GROUP BY
guest_id
) subq_26
ON
subq_20.guest = subq_26.guest
) subq_28
WHERE guest__bookers > 1.00

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-- Constrain Output with WHERE
-- Pass Only Elements: ['bookers',]
-- Aggregate Measures
-- Compute Metrics via Expressions
SELECT
COUNT(DISTINCT bookers) AS bookers
FROM (
-- Join Standard Outputs
-- Pass Only Elements: ['bookers', 'guest__bookers']
SELECT
subq_26.bookers AS guest__bookers
, subq_20.bookers AS bookers
FROM (
-- Read Elements From Semantic Model 'bookings_source'
-- Metric Time Dimension 'ds'
-- Pass Only Elements: ['bookers', 'guest']
SELECT
guest_id AS guest
, guest_id AS bookers
FROM ***************************.fct_bookings bookings_source_src_28000
) subq_20
LEFT OUTER JOIN (
-- Read Elements From Semantic Model 'bookings_source'
-- Metric Time Dimension 'ds'
-- Pass Only Elements: ['bookers', 'guest']
-- Aggregate Measures
-- Compute Metrics via Expressions
-- Pass Only Elements: ['guest', 'bookers']
SELECT
guest_id AS guest
, COUNT(DISTINCT guest_id) AS bookers
FROM ***************************.fct_bookings bookings_source_src_28000
GROUP BY
guest
) subq_26
ON
subq_20.guest = subq_26.guest
) subq_28
WHERE guest__bookers > 1.00

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-- Constrain Output with WHERE
-- Pass Only Elements: ['bookers',]
-- Aggregate Measures
-- Compute Metrics via Expressions
SELECT
COUNT(DISTINCT bookers) AS bookers
FROM (
-- Join Standard Outputs
-- Pass Only Elements: ['bookers', 'guest__bookers']
SELECT
subq_26.bookers AS guest__bookers
, subq_20.bookers AS bookers
FROM (
-- Read Elements From Semantic Model 'bookings_source'
-- Metric Time Dimension 'ds'
-- Pass Only Elements: ['bookers', 'guest']
SELECT
guest_id AS guest
, guest_id AS bookers
FROM ***************************.fct_bookings bookings_source_src_28000
) subq_20
LEFT OUTER JOIN (
-- Read Elements From Semantic Model 'bookings_source'
-- Metric Time Dimension 'ds'
-- Pass Only Elements: ['bookers', 'guest']
-- Aggregate Measures
-- Compute Metrics via Expressions
-- Pass Only Elements: ['guest', 'bookers']
SELECT
guest_id AS guest
, COUNT(DISTINCT guest_id) AS bookers
FROM ***************************.fct_bookings bookings_source_src_28000
GROUP BY
guest_id
) subq_26
ON
subq_20.guest = subq_26.guest
) subq_28
WHERE guest__bookers > 1.00

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-- Constrain Output with WHERE
-- Pass Only Elements: ['bookers',]
-- Aggregate Measures
-- Compute Metrics via Expressions
SELECT
COUNT(DISTINCT bookers) AS bookers
FROM (
-- Join Standard Outputs
-- Pass Only Elements: ['bookers', 'guest__bookers']
SELECT
subq_26.bookers AS guest__bookers
, subq_20.bookers AS bookers
FROM (
-- Read Elements From Semantic Model 'bookings_source'
-- Metric Time Dimension 'ds'
-- Pass Only Elements: ['bookers', 'guest']
SELECT
guest_id AS guest
, guest_id AS bookers
FROM ***************************.fct_bookings bookings_source_src_28000
) subq_20
LEFT OUTER JOIN (
-- Read Elements From Semantic Model 'bookings_source'
-- Metric Time Dimension 'ds'
-- Pass Only Elements: ['bookers', 'guest']
-- Aggregate Measures
-- Compute Metrics via Expressions
-- Pass Only Elements: ['guest', 'bookers']
SELECT
guest_id AS guest
, COUNT(DISTINCT guest_id) AS bookers
FROM ***************************.fct_bookings bookings_source_src_28000
GROUP BY
guest_id
) subq_26
ON
subq_20.guest = subq_26.guest
) subq_28
WHERE guest__bookers > 1.00
Loading

0 comments on commit 6f8b6c4

Please sign in to comment.