Sbhn_NPusdc & dai 1
Updated 2023-03-03
99
1
2
3
4
5
6
7
8
9
10
›
⌄
SELECT
date_trunc('month', block_timestamp) as month,
sum(case WHEN symbol_in LIKE 'DAI' then amount_in_usd ELSE 0 end) as sell_volume,
sum(case WHEN symbol_out LIKE 'DAI' then amount_out_usd ELSE 0 end) as buy_volume,
sum(case WHEN symbol_out LIKE 'DAI' then amount_out_usd ELSE 0 end) - sum(case WHEN symbol_in LIKE 'DAI' then amount_in_usd ELSE 0 end) as net_buy_volume
FROM ethereum.core.ez_dex_swaps
WHERE symbol_in LIKE 'DAI'
OR symbol_out LIKE 'DAI'
GROUP BY 1
Run a query to Download Data