superflyUntitled Query
Updated 2022-10-28
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
with tab1 as (
select distinct ORIGIN_FROM_ADDRESS
from ethereum.core.fact_event_logs
where CONTRACT_ADDRESS='0x881d40237659c251811cec9c364ef91dc08d300c'),
tab2 as (
select BLOCK_TIMESTAMP::date as date,ORIGIN_FROM_ADDRESS,AMOUNT_OUT_USD
from ethereum.core.ez_dex_swaps
where date>=current_date-60
group by 1,2,3)
select date,count(tab2.ORIGIN_FROM_ADDRESS)as meta_swapper,sum(AMOUNT_OUT_USD)as swap_volume,
sum (meta_swapper) over (order by date asc)as cumulative_meta_swapper,
sum(swap_volume) over (order by date asc)as cumulative_swap_volume
from tab1
left join tab2
on tab1.ORIGIN_FROM_ADDRESS=tab2.ORIGIN_FROM_ADDRESS
group by 1
Run a query to Download Data