MLDZMNcon1
Updated 2023-01-10Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with t1 as (select
distinct tx:body:messages[0]:contract as contract_name,
min(block_timestamp) as first_appear
from terra.core.fact_transactions
where TX_SUCCEEDED='TRUE'
group by 1
)
SELECT
date_trunc('week',first_appear) as date,
case
when date>='2022-12-25' then 'Holidays and new year'
else 'Before holidays' end as days,
count(distinct contract_name) as no_contracts,
sum(no_contracts) over (order by date) as cumulative_contracts
from t1
where date>='2022-12-01'
group by 1,2
order by 1
Run a query to Download Data