Created
November 24, 2022 15:26
-
-
Save mshakhomirov/35d956fa9db86b12b44ab62c00f42a40 to your computer and use it in GitHub Desktop.
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
select | |
target_id | |
,product_id | |
,product_type_id | |
,production.purchase_summary_udf()( | |
ARRAY_AGG( | |
STRUCT( | |
target_id | |
, user_id | |
, product_type_id | |
, product_id | |
, item_count | |
, days | |
, expire_time_after_purchase | |
, transaction_id | |
, purchase_created_at | |
, updated_at | |
) | |
order by purchase_created_at | |
) | |
) AS processed | |
from new_batch | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment