NuveveCryptoArchivedweekly user volume
Updated 2024-06-18
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
›
⌄
with first_appearance as (
select
sender,
min(block_timestamp::date) as first_date
from ethereum.defi.ez_dex_swaps
where origin_to_address = '0x881d40237659c251811cec9c364ef91dc08d300c'
group by sender
),
weekly_volume as (
select
date_trunc('week', block_timestamp::date) as week,
sender,
sum(amount_in_usd) as weekly_volume
from ethereum.defi.ez_dex_swaps
where origin_to_address = '0x881d40237659c251811cec9c364ef91dc08d300c'
and block_timestamp >= current_date() - 365
group by week, sender
)
select
wv.week,
sum(case when wv.week = date_trunc('week', fa.first_date) then wv.weekly_volume else 0 end) as new_user_volume,
sum(case when wv.week > date_trunc('week', fa.first_date) then wv.weekly_volume else 0 end) as old_user_volume
from weekly_volume wv
left join first_appearance fa on wv.sender = fa.sender
group by wv.week
order by wv.week;
Auto-refreshes every 24 hours
QueryRunArchived: QueryRun has been archived