JonasoIncrement (1)
Updated 2024-09-05
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 block_timestamp, origin_from_address as trader, case when amount_out_usd is not null then amount_out_usd else amount_in_usd end as volume
from flow.defi.ez_dex_swaps
where (platform like '%increment%' or platform is null)
and year(block_timestamp) = '2024' ),
A as(
select date_trunc('month',block_timestamp) as time, sum(volume) as volume
from X
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 A
order by 1 desc
QueryRunArchived: QueryRun has been archived