JonasoCellana (1)
Updated 2024-10-13
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with
X as(
select date_trunc('month',block_timestamp) as time,
sum(case when amount_out_usd is not null then amount_out_usd else amount_in_usd end) as volume
from aptos.defi.ez_dex_swaps
where platform = 'cellana'
and year(block_timestamp) = '2024'
and amount_in_usd < 1e6
and amount_out_usd < 1e6
group by 1)
select
time, volume,
sum(volume) over(order by time) - volume as volume_pre,
sum(volume) over(order by time) as volume_all
from X
order by 1 desc
QueryRunArchived: QueryRun has been archived