Moe7 uniswap on optimism
Updated 2023-01-25
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
›
⌄
with base as
(select
*,concat (TOKEN0_SYMBOL,'-',TOKEN1_SYMBOL) as swap_pair
from ethereum.uniswapv3.ez_swaps)
select
swap_pair,
sum(case when AMOUNT1_USD<0 then -1*AMOUNT1_USD else AMOUNT1_USD end) as swaps_usd ,
count(distinct SENDER) as swappers, count(distinct tx_hash) as swaps,
swaps_usd/swappers as usd_per_swapper,
swaps_usd/swaps as usd_per_swap,
row_number()over(order by swaps_usd desc) as rank
from base
where block_timestamp::date >= current_date - {{days_back}}
group by 1 having swaps_usd is not null order by 2 desc limit 10
Run a query to Download Data