kiichiUntitled Query
Updated 2022-06-27
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
›
⌄
with pa1 as (
SELECT
date_trunc(day,block_hour) as date,
avg( price_usd) as algo_price
from flipside_prod_db.algorand.prices_swap
where asset_id='0'
and date between '2022-01-1' and '2022-06-1'
group by date
),
pa2 as (
SELECT
count(tx_id) as Number_of_Transactions,
date_trunc(day,block_timestamp) as date
from flipside_prod_db.algorand.transactions
where date between '2022-01-1' and '2022-06-1'
and asset_id='0'
group by date
)
SELECT
a.date,
a.algo_price,
b.Number_of_transactions
from pa1 a
left join pa2 b
on a.date=b.date
Run a query to Download Data