MLDZMNPrice and volume
Updated 2022-05-24
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
›
⌄
with tb1 as (
select
date(BLOCK_HOUR) as day,
avg(PRICE_USD) as price
from flipside_prod_db.algorand.prices_swap
where ASSET_ID='226701642'
and day>='2022-01-01'
and day< '2022-05-22'
and MIN_PRICE_USD_HOUR is not null
and MAX_PRICE_USD_HOUR is not null
group by DAY
order by day
),
tb2 as (select
BLOCK_TIMESTAMP::date as day,
sum(SWAP_FROM_AMOUNT) as volume,
count(distinct SWAPPER) as swappers
from flipside_prod_db.algorand.swaps
where SWAP_FROM_ASSET_ID='226701642'
and BLOCK_TIMESTAMP>='2022-01-01'
group by 1
)
select
tb1.day as day,
price as "Yieldly price",
volume
from tb1 join tb2 on tb1.day=tb2.day
Run a query to Download Data