AzinOver time
Updated 2024-04-02
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
29
30
31
32
33
34
35
36
›
⌄
select
count(case when blockchain='arbitrum' then 1 else null end) as arb_number,
count(case when blockchain='Base' then 1 else null end) as base_number,
count(case when blockchain='Optimism' then 1 else null end) as op_number,
sum(case when blockchain='arbitrum' then AMOUNT_IN_USD else 0 end) as arb_volume,
sum(case when blockchain='Base' then AMOUNT_IN_USD else 0 end) as base_volume,
sum(case when blockchain='Optimism' then AMOUNT_IN_USD else 0 end) as op_volume,
avg(case when blockchain='arbitrum' then AMOUNT_IN_USD else 0 end) as arb_avg,
avg(case when blockchain='Base' then AMOUNT_IN_USD else 0 end) as base_avg,
avg(case when blockchain='Optimism' then AMOUNT_IN_USD else 0 end) as op_avg,
date_trunc('week',BLOCK_TIMESTAMP) as date
from
((select
'arbitrum' as blockchain ,
*
from
arbitrum.defi.ez_dex_swaps
where
PLATFORM like '%uniswap%'
and
BLOCK_TIMESTAMP>current_date-365)
union all
(select
'Base' as blockchain ,
*
from
Base.defi.ez_dex_swaps
where
PLATFORM like '%uniswap%'
QueryRunArchived: QueryRun has been archived