RamaharDevelopment
Updated 2023-01-09Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
select
DATE(block_timestamp) as dayz,
case
when dayz >= '2023-01-01' then 'New Year'
when dayz BETWEEN '2022-12-24' AND '2022-12-25' then 'Christmas'
else 'Year 2022' end as yr_types,
count(distinct tx_id) as n_contracts,
sum(n_contracts) over (partition by yr_types order by dayz asc rows between unbounded preceding and current row) as cumu_n_contracts
from terra.core.ez_messages
where message_type LIKE '%MsgInstantiateContract'
and dayz BETWEEN '2022-12-01' AND '2023-01-05'
group by 1, 2
order by 1 asc
Run a query to Download Data