superflyUntitled Query
Updated 2022-11-24Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
›
⌄
SELECT
sum(CASE WHEN symbol_in LIKE 'weth' then amount_in_usd END) volume_sold,
sum(CASE WHEN symbol_out LIKE 'weth'then amount_in_usd END) volume_bought,
sum(CASE WHEN symbol_in LIKE 'weth' then -1 * amount_in_usd
WHEN symbol_out LIKE 'weth' then amount_in_usd END) as net_volume,
count(*) as swap_evetns
FROM ethereum.core.ez_dex_swaps
where block_timestamp > CURRENT_DATE - 30
Run a query to Download Data