MasiMonthly Number of New Contracts
Updated 2024-11-02
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with tb1 as ( select min(block_timestamp) as day,
Split(payload_function, '::')[0] AS contract
from aptos.core.fact_transactions t
where tx_type = 'user_transaction'
group by 2
)
select trunc(day,'month') as monthly,
case when day < '2023-01-01' then 'Q4 2022 (Launch)'
when day >= '2023-01-01' and day < '2023-04-01' then 'Q1-2023'
when day >= '2023-04-01' and day < '2023-07-01' then 'Q2-2023'
when day >= '2023-07-01' and day < '2023-10-01' then 'Q3-2023'
when day >= '2023-10-01' and day < '2024-01-01' then 'Q4-2023'
when day >= '2024-01-01' and day < '2024-04-01' then 'Q1-2024'
when day >= '2024-04-01' and day < '2024-07-01' then 'Q2-2024'
when day >= '2024-07-01' and day < '2024-10-01' then 'Q3-2024'
when day >= '2024-10-01' and day < '2025-01-01' then 'Q4-2024' end as breakdown,
count(DISTINCT contract) as "New Contract"
from tb1
group by 1,2
order by 1 asc
QueryRunArchived: QueryRun has been archived