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 Aug 28, 2024
1 parent 9321f9b commit d9512c5
Show file tree
Hide file tree
Showing 36 changed files with 1,170 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ SELECT
, subq_0.ds__extract_day AS ds__extract_day
, subq_0.ds__extract_dow AS ds__extract_dow
, subq_0.ds__extract_doy AS ds__extract_doy
, subq_0.ds_month__month AS ds_month__month
, subq_0.ds_month__quarter AS ds_month__quarter
, subq_0.ds_month__year AS ds_month__year
, subq_0.ds_month__extract_year AS ds_month__extract_year
, subq_0.ds_month__extract_quarter AS ds_month__extract_quarter
, subq_0.ds_month__extract_month AS ds_month__extract_month
, subq_0.account__ds__day AS account__ds__day
, subq_0.account__ds__week AS account__ds__week
, subq_0.account__ds__month AS account__ds__month
Expand All @@ -22,19 +28,27 @@ SELECT
, subq_0.account__ds__extract_day AS account__ds__extract_day
, subq_0.account__ds__extract_dow AS account__ds__extract_dow
, subq_0.account__ds__extract_doy AS account__ds__extract_doy
, subq_0.account__ds_month__month AS account__ds_month__month
, subq_0.account__ds_month__quarter AS account__ds_month__quarter
, subq_0.account__ds_month__year AS account__ds_month__year
, subq_0.account__ds_month__extract_year AS account__ds_month__extract_year
, subq_0.account__ds_month__extract_quarter AS account__ds_month__extract_quarter
, subq_0.account__ds_month__extract_month AS account__ds_month__extract_month
, subq_0.user AS user
, subq_0.account__user AS account__user
, subq_0.account_type AS account_type
, subq_0.account__account_type AS account__account_type
, subq_0.account_balance AS account_balance
, subq_0.total_account_balance_first_day AS total_account_balance_first_day
, subq_0.current_account_balance_by_user AS current_account_balance_by_user
, subq_0.total_account_balance_first_day_of_month AS total_account_balance_first_day_of_month
FROM (
-- Read Elements From Semantic Model 'accounts_source'
SELECT
accounts_source_src_28000.account_balance
, accounts_source_src_28000.account_balance AS total_account_balance_first_day
, accounts_source_src_28000.account_balance AS current_account_balance_by_user
, accounts_source_src_28000.account_balance AS total_account_balance_first_day_of_month
, DATETIME_TRUNC(accounts_source_src_28000.ds, day) AS ds__day
, DATETIME_TRUNC(accounts_source_src_28000.ds, isoweek) AS ds__week
, DATETIME_TRUNC(accounts_source_src_28000.ds, month) AS ds__month
Expand All @@ -46,6 +60,12 @@ FROM (
, EXTRACT(day FROM accounts_source_src_28000.ds) AS ds__extract_day
, IF(EXTRACT(dayofweek FROM accounts_source_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM accounts_source_src_28000.ds) - 1) AS ds__extract_dow
, EXTRACT(dayofyear FROM accounts_source_src_28000.ds) AS ds__extract_doy
, DATETIME_TRUNC(DATE_TRUNC('month', ds), month) AS ds_month__month
, DATETIME_TRUNC(DATE_TRUNC('month', ds), quarter) AS ds_month__quarter
, DATETIME_TRUNC(DATE_TRUNC('month', ds), year) AS ds_month__year
, EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year
, EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter
, EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month
, accounts_source_src_28000.account_type
, DATETIME_TRUNC(accounts_source_src_28000.ds, day) AS account__ds__day
, DATETIME_TRUNC(accounts_source_src_28000.ds, isoweek) AS account__ds__week
Expand All @@ -58,6 +78,12 @@ FROM (
, EXTRACT(day FROM accounts_source_src_28000.ds) AS account__ds__extract_day
, IF(EXTRACT(dayofweek FROM accounts_source_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM accounts_source_src_28000.ds) - 1) AS account__ds__extract_dow
, EXTRACT(dayofyear FROM accounts_source_src_28000.ds) AS account__ds__extract_doy
, DATETIME_TRUNC(DATE_TRUNC('month', ds), month) AS account__ds_month__month
, DATETIME_TRUNC(DATE_TRUNC('month', ds), quarter) AS account__ds_month__quarter
, DATETIME_TRUNC(DATE_TRUNC('month', ds), year) AS account__ds_month__year
, EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year
, EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter
, EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month
, accounts_source_src_28000.account_type AS account__account_type
, accounts_source_src_28000.user_id AS user
, accounts_source_src_28000.user_id AS account__user
Expand All @@ -73,6 +99,7 @@ INNER JOIN (
accounts_source_src_28000.account_balance
, accounts_source_src_28000.account_balance AS total_account_balance_first_day
, accounts_source_src_28000.account_balance AS current_account_balance_by_user
, accounts_source_src_28000.account_balance AS total_account_balance_first_day_of_month
, DATETIME_TRUNC(accounts_source_src_28000.ds, day) AS ds__day
, DATETIME_TRUNC(accounts_source_src_28000.ds, isoweek) AS ds__week
, DATETIME_TRUNC(accounts_source_src_28000.ds, month) AS ds__month
Expand All @@ -84,6 +111,12 @@ INNER JOIN (
, EXTRACT(day FROM accounts_source_src_28000.ds) AS ds__extract_day
, IF(EXTRACT(dayofweek FROM accounts_source_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM accounts_source_src_28000.ds) - 1) AS ds__extract_dow
, EXTRACT(dayofyear FROM accounts_source_src_28000.ds) AS ds__extract_doy
, DATETIME_TRUNC(DATE_TRUNC('month', ds), month) AS ds_month__month
, DATETIME_TRUNC(DATE_TRUNC('month', ds), quarter) AS ds_month__quarter
, DATETIME_TRUNC(DATE_TRUNC('month', ds), year) AS ds_month__year
, EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year
, EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter
, EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month
, accounts_source_src_28000.account_type
, DATETIME_TRUNC(accounts_source_src_28000.ds, day) AS account__ds__day
, DATETIME_TRUNC(accounts_source_src_28000.ds, isoweek) AS account__ds__week
Expand All @@ -96,6 +129,12 @@ INNER JOIN (
, EXTRACT(day FROM accounts_source_src_28000.ds) AS account__ds__extract_day
, IF(EXTRACT(dayofweek FROM accounts_source_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM accounts_source_src_28000.ds) - 1) AS account__ds__extract_dow
, EXTRACT(dayofyear FROM accounts_source_src_28000.ds) AS account__ds__extract_doy
, DATETIME_TRUNC(DATE_TRUNC('month', ds), month) AS account__ds_month__month
, DATETIME_TRUNC(DATE_TRUNC('month', ds), quarter) AS account__ds_month__quarter
, DATETIME_TRUNC(DATE_TRUNC('month', ds), year) AS account__ds_month__year
, EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year
, EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter
, EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month
, accounts_source_src_28000.account_type AS account__account_type
, accounts_source_src_28000.user_id AS user
, accounts_source_src_28000.user_id AS account__user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ SELECT
, subq_3.ds__extract_day AS ds__extract_day
, subq_3.ds__extract_dow AS ds__extract_dow
, subq_3.ds__extract_doy AS ds__extract_doy
, subq_3.ds_month__month AS ds_month__month
, subq_3.ds_month__quarter AS ds_month__quarter
, subq_3.ds_month__year AS ds_month__year
, subq_3.ds_month__extract_year AS ds_month__extract_year
, subq_3.ds_month__extract_quarter AS ds_month__extract_quarter
, subq_3.ds_month__extract_month AS ds_month__extract_month
, subq_3.account__ds__day AS account__ds__day
, subq_3.account__ds__week AS account__ds__week
, subq_3.account__ds__month AS account__ds__month
Expand All @@ -22,19 +28,27 @@ SELECT
, subq_3.account__ds__extract_day AS account__ds__extract_day
, subq_3.account__ds__extract_dow AS account__ds__extract_dow
, subq_3.account__ds__extract_doy AS account__ds__extract_doy
, subq_3.account__ds_month__month AS account__ds_month__month
, subq_3.account__ds_month__quarter AS account__ds_month__quarter
, subq_3.account__ds_month__year AS account__ds_month__year
, subq_3.account__ds_month__extract_year AS account__ds_month__extract_year
, subq_3.account__ds_month__extract_quarter AS account__ds_month__extract_quarter
, subq_3.account__ds_month__extract_month AS account__ds_month__extract_month
, subq_3.user AS user
, subq_3.account__user AS account__user
, subq_3.account_type AS account_type
, subq_3.account__account_type AS account__account_type
, subq_3.account_balance AS account_balance
, subq_3.total_account_balance_first_day AS total_account_balance_first_day
, subq_3.current_account_balance_by_user AS current_account_balance_by_user
, subq_3.total_account_balance_first_day_of_month AS total_account_balance_first_day_of_month
FROM (
-- Read Elements From Semantic Model 'accounts_source'
SELECT
account_balance
, account_balance AS total_account_balance_first_day
, account_balance AS current_account_balance_by_user
, account_balance AS total_account_balance_first_day_of_month
, DATETIME_TRUNC(ds, day) AS ds__day
, DATETIME_TRUNC(ds, isoweek) AS ds__week
, DATETIME_TRUNC(ds, month) AS ds__month
Expand All @@ -46,6 +60,12 @@ FROM (
, EXTRACT(day FROM ds) AS ds__extract_day
, IF(EXTRACT(dayofweek FROM ds) = 1, 7, EXTRACT(dayofweek FROM ds) - 1) AS ds__extract_dow
, EXTRACT(dayofyear FROM ds) AS ds__extract_doy
, DATETIME_TRUNC(DATE_TRUNC('month', ds), month) AS ds_month__month
, DATETIME_TRUNC(DATE_TRUNC('month', ds), quarter) AS ds_month__quarter
, DATETIME_TRUNC(DATE_TRUNC('month', ds), year) AS ds_month__year
, EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year
, EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter
, EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month
, account_type
, DATETIME_TRUNC(ds, day) AS account__ds__day
, DATETIME_TRUNC(ds, isoweek) AS account__ds__week
Expand All @@ -58,6 +78,12 @@ FROM (
, EXTRACT(day FROM ds) AS account__ds__extract_day
, IF(EXTRACT(dayofweek FROM ds) = 1, 7, EXTRACT(dayofweek FROM ds) - 1) AS account__ds__extract_dow
, EXTRACT(dayofyear FROM ds) AS account__ds__extract_doy
, DATETIME_TRUNC(DATE_TRUNC('month', ds), month) AS account__ds_month__month
, DATETIME_TRUNC(DATE_TRUNC('month', ds), quarter) AS account__ds_month__quarter
, DATETIME_TRUNC(DATE_TRUNC('month', ds), year) AS account__ds_month__year
, EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year
, EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter
, EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month
, account_type AS account__account_type
, user_id AS user
, user_id AS account__user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ SELECT
, subq_0.ds__extract_day AS ds__extract_day
, subq_0.ds__extract_dow AS ds__extract_dow
, subq_0.ds__extract_doy AS ds__extract_doy
, subq_0.ds_month__month AS ds_month__month
, subq_0.ds_month__quarter AS ds_month__quarter
, subq_0.ds_month__year AS ds_month__year
, subq_0.ds_month__extract_year AS ds_month__extract_year
, subq_0.ds_month__extract_quarter AS ds_month__extract_quarter
, subq_0.ds_month__extract_month AS ds_month__extract_month
, subq_0.account__ds__day AS account__ds__day
, subq_0.account__ds__week AS account__ds__week
, subq_0.account__ds__month AS account__ds__month
Expand All @@ -22,19 +28,27 @@ SELECT
, subq_0.account__ds__extract_day AS account__ds__extract_day
, subq_0.account__ds__extract_dow AS account__ds__extract_dow
, subq_0.account__ds__extract_doy AS account__ds__extract_doy
, subq_0.account__ds_month__month AS account__ds_month__month
, subq_0.account__ds_month__quarter AS account__ds_month__quarter
, subq_0.account__ds_month__year AS account__ds_month__year
, subq_0.account__ds_month__extract_year AS account__ds_month__extract_year
, subq_0.account__ds_month__extract_quarter AS account__ds_month__extract_quarter
, subq_0.account__ds_month__extract_month AS account__ds_month__extract_month
, subq_0.user AS user
, subq_0.account__user AS account__user
, subq_0.account_type AS account_type
, subq_0.account__account_type AS account__account_type
, subq_0.account_balance AS account_balance
, subq_0.total_account_balance_first_day AS total_account_balance_first_day
, subq_0.current_account_balance_by_user AS current_account_balance_by_user
, subq_0.total_account_balance_first_day_of_month AS total_account_balance_first_day_of_month
FROM (
-- Read Elements From Semantic Model 'accounts_source'
SELECT
accounts_source_src_28000.account_balance
, accounts_source_src_28000.account_balance AS total_account_balance_first_day
, accounts_source_src_28000.account_balance AS current_account_balance_by_user
, accounts_source_src_28000.account_balance AS total_account_balance_first_day_of_month
, DATETIME_TRUNC(accounts_source_src_28000.ds, day) AS ds__day
, DATETIME_TRUNC(accounts_source_src_28000.ds, isoweek) AS ds__week
, DATETIME_TRUNC(accounts_source_src_28000.ds, month) AS ds__month
Expand All @@ -46,6 +60,12 @@ FROM (
, EXTRACT(day FROM accounts_source_src_28000.ds) AS ds__extract_day
, IF(EXTRACT(dayofweek FROM accounts_source_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM accounts_source_src_28000.ds) - 1) AS ds__extract_dow
, EXTRACT(dayofyear FROM accounts_source_src_28000.ds) AS ds__extract_doy
, DATETIME_TRUNC(DATE_TRUNC('month', ds), month) AS ds_month__month
, DATETIME_TRUNC(DATE_TRUNC('month', ds), quarter) AS ds_month__quarter
, DATETIME_TRUNC(DATE_TRUNC('month', ds), year) AS ds_month__year
, EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year
, EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter
, EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month
, accounts_source_src_28000.account_type
, DATETIME_TRUNC(accounts_source_src_28000.ds, day) AS account__ds__day
, DATETIME_TRUNC(accounts_source_src_28000.ds, isoweek) AS account__ds__week
Expand All @@ -58,6 +78,12 @@ FROM (
, EXTRACT(day FROM accounts_source_src_28000.ds) AS account__ds__extract_day
, IF(EXTRACT(dayofweek FROM accounts_source_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM accounts_source_src_28000.ds) - 1) AS account__ds__extract_dow
, EXTRACT(dayofyear FROM accounts_source_src_28000.ds) AS account__ds__extract_doy
, DATETIME_TRUNC(DATE_TRUNC('month', ds), month) AS account__ds_month__month
, DATETIME_TRUNC(DATE_TRUNC('month', ds), quarter) AS account__ds_month__quarter
, DATETIME_TRUNC(DATE_TRUNC('month', ds), year) AS account__ds_month__year
, EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year
, EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter
, EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month
, accounts_source_src_28000.account_type AS account__account_type
, accounts_source_src_28000.user_id AS user
, accounts_source_src_28000.user_id AS account__user
Expand All @@ -74,6 +100,7 @@ INNER JOIN (
accounts_source_src_28000.account_balance
, accounts_source_src_28000.account_balance AS total_account_balance_first_day
, accounts_source_src_28000.account_balance AS current_account_balance_by_user
, accounts_source_src_28000.account_balance AS total_account_balance_first_day_of_month
, DATETIME_TRUNC(accounts_source_src_28000.ds, day) AS ds__day
, DATETIME_TRUNC(accounts_source_src_28000.ds, isoweek) AS ds__week
, DATETIME_TRUNC(accounts_source_src_28000.ds, month) AS ds__month
Expand All @@ -85,6 +112,12 @@ INNER JOIN (
, EXTRACT(day FROM accounts_source_src_28000.ds) AS ds__extract_day
, IF(EXTRACT(dayofweek FROM accounts_source_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM accounts_source_src_28000.ds) - 1) AS ds__extract_dow
, EXTRACT(dayofyear FROM accounts_source_src_28000.ds) AS ds__extract_doy
, DATETIME_TRUNC(DATE_TRUNC('month', ds), month) AS ds_month__month
, DATETIME_TRUNC(DATE_TRUNC('month', ds), quarter) AS ds_month__quarter
, DATETIME_TRUNC(DATE_TRUNC('month', ds), year) AS ds_month__year
, EXTRACT(year FROM DATE_TRUNC('month', ds)) AS ds_month__extract_year
, EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS ds_month__extract_quarter
, EXTRACT(month FROM DATE_TRUNC('month', ds)) AS ds_month__extract_month
, accounts_source_src_28000.account_type
, DATETIME_TRUNC(accounts_source_src_28000.ds, day) AS account__ds__day
, DATETIME_TRUNC(accounts_source_src_28000.ds, isoweek) AS account__ds__week
Expand All @@ -97,6 +130,12 @@ INNER JOIN (
, EXTRACT(day FROM accounts_source_src_28000.ds) AS account__ds__extract_day
, IF(EXTRACT(dayofweek FROM accounts_source_src_28000.ds) = 1, 7, EXTRACT(dayofweek FROM accounts_source_src_28000.ds) - 1) AS account__ds__extract_dow
, EXTRACT(dayofyear FROM accounts_source_src_28000.ds) AS account__ds__extract_doy
, DATETIME_TRUNC(DATE_TRUNC('month', ds), month) AS account__ds_month__month
, DATETIME_TRUNC(DATE_TRUNC('month', ds), quarter) AS account__ds_month__quarter
, DATETIME_TRUNC(DATE_TRUNC('month', ds), year) AS account__ds_month__year
, EXTRACT(year FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_year
, EXTRACT(quarter FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_quarter
, EXTRACT(month FROM DATE_TRUNC('month', ds)) AS account__ds_month__extract_month
, accounts_source_src_28000.account_type AS account__account_type
, accounts_source_src_28000.user_id AS user
, accounts_source_src_28000.user_id AS account__user
Expand Down
Loading

0 comments on commit d9512c5

Please sign in to comment.