yasmin-n-d-r-hluna4
Updated 2023-01-07Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
›
⌄
---------------------
with contracts as (
select
distinct tx : body : messages[0] : contract as contracts,
min(block_timestamp) as deploy_day
from
terra.core.fact_transactions
where
TX_SUCCEEDED = 'TRUE'
group by
1
)
SELECT
date_trunc('day', deploy_day) as date,
count(distinct contracts) as total_contracts,
sum(total_contracts) over (
order by
date
) as cumulative_contracts
from
contracts
where
date > current_date - 30
group by
1
order by
1
Run a query to Download Data