Snippets Collections
select           cast(campaign_date as date) as spikedate
                ,case when cast(campaign_date as date) = date'2021-11-11' then '1111'
                      when is_big_campaign =  '1' and cast(campaign_date as date) <> date'2021-11-11' then 'Spike'
                      when is_big_campaign =  '0'  then 'Mini Spike' end as SpikeFlag
from            vnbi_bd.clusterbi_spike_days
where           ingestion_timestamp = (select max(ingestion_timestamp) m from shopee_vn.shopee_vn_bi_team__fmcgbi_campaign_day)
                and cast(campaign_date as date) >= date'2020-10-10'
star

Thu Nov 18 2021 13:38:34 GMT+0000 (Coordinated Universal Time)

#syntax #spike

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension