nitsPrice vs Volume of UNI traded
Updated 2022-04-01
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
with uni_prices as
(SELECT * from ethereum.token_prices_hourly
where token_address = '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984' and hour >= '2022-01-01')
SELECT * from
(SELECT trunc(block_timestamp, 'hour') as hr, sum(amt_net) as total_amt,
sum(amount_usd) as total_hourly_vol , sum(total_hourly_vol ) over (order by hr) as cumulative_total_hourly_vol ,
sum(total_amt) over (order by hr) as cumulative_total_amt
, count(DISTINCT to_address) as unique_providers,
sum(unique_providers) over (order by hr ) as cumulative_unique_providers
from
(SELECT *, case when direction = 'IN' then amount_usd else amount_usd*(-1) end as amt_net
from ethereum.dex_swaps
where platform like '%uniswap%' and block_timestamp >= '2022-01-01' and token_address = '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984')
GROUP by 1 )
inner join uni_prices
on hour = hr
order by hr
-- limit 100
Run a query to Download Data