-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bcdcd87
commit 6f8b6c4
Showing
10 changed files
with
2,480 additions
and
0 deletions.
There are no files selected for viewing
457 changes: 457 additions & 0 deletions
457
...t_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_filtered_by_itself__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...ilter_rendering.py/SqlQueryPlan/Trino/test_metric_filtered_by_itself__plan0_optimized.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
457 changes: 457 additions & 0 deletions
457
...etric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_filtered_by_itself__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...er_rendering.py/SqlQueryPlan/BigQuery/test_metric_filtered_by_itself__plan0_optimized.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
457 changes: 457 additions & 0 deletions
457
...ric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_filtered_by_itself__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
..._rendering.py/SqlQueryPlan/Databricks/test_metric_filtered_by_itself__plan0_optimized.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
457 changes: 457 additions & 0 deletions
457
...etric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_filtered_by_itself__plan0.sql
Large diffs are not rendered by default.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...er_rendering.py/SqlQueryPlan/Redshift/test_metric_filtered_by_itself__plan0_optimized.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.