nitsLast N day Swap Stats
Updated 2022-11-30
9
1
2
3
4
5
6
7
8
›
⌄
SELECT date(block_timestamp) as day,pool_name, count(DISTINCT tx_hash) as total_swaps,
sum(case when amount_in_usd is not NULL then amount_in_usd when amount_out_usd is not NULL then amount_out_usd else 0 end) as vol,
sum(total_swaps) over (partition by pool_name order by day ) as cum_txs,
sum(vol) over (partition by pool_name order by day ) as cum_vol
from avalanche.sushi.ez_swaps
where day >= CURRENT_DATE - {{N}}
GROUP by 1,2
Run a query to Download Data