0xHaM-dNew Users quarterly
Updated 2024-11-26
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
35
36
›
⌄
-- forked from Txs quarterly @ https://flipsidecrypto.xyz/edit/queries/a0d45cdc-4ff3-4b25-9c3d-f9853372cfc9
-- forked from hess / Volume quarterly @ https://flipsidecrypto.xyz/hess/q/RGFJgE22kinC/volume-quarterly
with txs as (
select
min(block_timestamp) as block_timestamp,
TX_FROM,
from axelar.core.fact_transactions
GROUP by 2
)
,
quarter as (
select
case
when block_timestamp::date >= '2022-01-01' and block_timestamp::date < '2022-04-01' then 'Q1-2022'
when block_timestamp::date >= '2022-04-01' and block_timestamp::date < '2022-07-01' then 'Q2-2022'
when block_timestamp::date >= '2022-07-01' and block_timestamp::date < '2022-10-01' then 'Q3-2022'
when block_timestamp::date >= '2022-10-01' and block_timestamp::date < '2023-01-01' then 'Q4-2022'
when block_timestamp::date >= '2023-01-01' and block_timestamp::date < '2023-04-01' then 'Q1-2023'
when block_timestamp::date >= '2023-04-01' and block_timestamp::date < '2023-07-01' then 'Q2-2023'
when block_timestamp::date >= '2023-07-01' and block_timestamp::date < '2023-10-01' then 'Q3-2023'
when block_timestamp::date >= '2023-10-01' and block_timestamp::date < '2024-01-01' then 'Q4-2023'
when block_timestamp::date >= '2024-01-01' and block_timestamp::date < '2024-04-01' then 'Q1-2024'
when block_timestamp::date >= '2024-04-01' and block_timestamp::date < '2024-07-01' then 'Q2-2024'
when block_timestamp::date >= '2024-07-01' and block_timestamp::date < '2024-10-01' then 'Q3-2024'
when block_timestamp::date >= '2024-10-01' and block_timestamp::date < '2025-01-01' then 'Q4-2024' end as type,
*
from txs
)
select
trunc(block_timestamp,'day') as daily,
type,
count(DISTINCT TX_FROM) as new_users,
sum(new_users) over (partition by type order by daily asc) as Quarterly
QueryRunArchived: QueryRun has been archived