bachimarket volatility sushi
Updated 2022-06-30
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
›
⌄
WITH
swapin_txns as (
SELECT
date(block_timestamp) as day,
round(sum(amount_in_usd),2) as swapped_amount_usd,
count(distinct tx_hash) as no_of_swaps,
count(distinct origin_from_address) as no_of_users
from ethereum.sushi.ez_swaps
where block_timestamp >='2022-05-01' and amount_in_usd<1e8
and amount_in_usd > 0 and amount_in_usd is not null
and platform = 'sushiswap'
group by 1
order by 1 ASC
),
swapout_txns as (
SELECT
date(block_timestamp) as day,
round(sum(amount_out_usd),2) as swapped_amount_usd,
count(distinct tx_hash) as no_of_swaps,
count(distinct origin_from_address) as no_of_users
from ethereum.sushi.ez_swaps
where block_timestamp >='2022-05-01'
and amount_out_usd < 1e8 and amount_out_usd > 0 and amount_out_usd is not null
and platform = 'sushiswap'
group by 1
order by 1 ASC
)
select *, 'Swap-in' as "Swap Category" from swapin_txns
UNION
select *, 'Swap-Out' as "Swap Category" from swapout_txns
Run a query to Download Data