FatemeTheLadyTop 10 Addresses copy
Updated 2023-05-05
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
›
⌄
-- forked from Top 10 Addresses @ https://flipsidecrypto.xyz/edit/queries/411acc29-0e3d-407c-9060-1ba7c5c4f884
with top_ as
(select
origin_from_address as address,
count(distinct tx_hash) as swaps
from
avalanche.core.ez_dex_swaps
where block_timestamp::date between '{{StartDate}}' and '{{EndDate}}'
group by 1
order by 2 desc
)
select
date_trunc('{{Interval}}',block_timestamp) as "TimeStamp",
count(distinct tx_hash) as "Swaps",
count(distinct origin_from_address) as "Active users",
sum("Swaps") over(order by "TimeStamp" asc) as "cumulative swaps",
sum("Active users") over(order by "TimeStamp" asc) as "cumulative active users"
from
avalanche.core.ez_dex_swaps
where origin_from_address in (select address from top_)
and block_timestamp::date between '{{StartDate}}' and '{{EndDate}}'
group by 1
order by 1 asc