daily model for guest products

This commit is contained in:
Joaquin Ossa 2024-11-08 15:25:11 +01:00
parent 2f80642f6c
commit 98ba74481a
4 changed files with 333 additions and 1 deletions

View file

@ -9,6 +9,7 @@ select
-- Unique Key --
icvp.payment_paid_date_utc as date,
coalesce(icuh.id_deal, 'UNSET') as id_deal,
'With Payment' as has_payment,
case
when icv.id_verification is null then 'W/O Id Check' else 'With Id Check'
end as has_id_check,
@ -76,4 +77,4 @@ left join
on icuh.id_deal = icmas.id_deal
and icvp.payment_paid_date_utc = icmas.date
where upper(icvp.payment_status) = {{ var("paid_payment_state") }}
group by 1, 2, 3, 4, 5
group by 1, 2, 3, 4, 5, 6