adriaparcerisasAptos Dex 3.4
Updated 2024-12-13
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
›
⌄
with
news as (
select distinct swapper, min(trunc(block_timestamp,'day')) as debut
FROM
aptos.defi.ez_dex_swaps
where AMOUNT_IN_USD<1e6 and amount_in_usd is not null
GROUP BY
1
)
SELECT
debut as day, case when trunc(debut,'year') ilike '%2024%' then 2024 when trunc(debut,'year') ilike '%2023%' then 2023 else 2022 end as year, count(distinct swapper) as new_swapper, sum(new_swapper) over (partition by year order by day) as total_swappers
FROM
news
GROUP BY
year, day
ORDER BY
day DESC, year
QueryRunArchived: QueryRun has been archived