Skip to content

Commit

Permalink
Fix check query SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Sep 24, 2024
1 parent dc2fa97 commit 4aa9095
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions tests_metricflow/integration/test_cases/itest_granularity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -391,17 +391,11 @@ integration_test:
FROM (
SELECT
ts2.martian_day AS metric_time__martian_day
, SUM(ts2.booking_value) AS booking_value
FROM (
SELECT
ts.ds AS metric_time__day
, b.booking_value AS booking_value
FROM {{ source_schema }}.mf_time_spine ts
INNER JOIN {{ source_schema }}.fct_bookings b
ON {{ render_date_sub("ts", "ds", 1, TimeGranularity.WEEK) }} = {{ render_date_trunc("b.ds", TimeGranularity.DAY) }}
) ts2
LEFT OUTER JOIN {{ source_schema }}.mf_time_spine ts2
ON ts2.metric_time__day = ts2.ds
, SUM(b.booking_value) AS booking_value
FROM {{ source_schema }}.mf_time_spine ts
INNER JOIN {{ source_schema }}.fct_bookings b
ON {{ render_date_sub("ts", "ds", 1, TimeGranularity.WEEK) }} = {{ render_date_trunc("b.ds", TimeGranularity.DAY) }}
LEFT OUTER JOIN {{ source_schema }}.mf_time_spine ts2 ON ts.ds = ts2.ds
GROUP BY ts2.martian_day
) subq_8
FULL OUTER JOIN (
Expand Down

0 comments on commit 4aa9095

Please sign in to comment.