mu-tafaUntitled Query
Updated 2022-06-30Copy Reference Fork
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
›
⌄
with que1 as (
SELECT
count(tx_id) as tx_amount,
date_trunc(day,block_timestamp) as date
from flipside_prod_db.algorand.transactions
where asset_id='0'
AND date>='2022-03-1'
and date<='2022-06-30'
group by date
),
que2 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 ASSET_NAME='ALGO'
AND date>='2022-03-1'
and date<='2022-06-30'
group by date )
SELECT
b.algo_price,
b.date,
a.tx_amount
from que1 a
left join que2 b
on a.date=b.date
Run a query to Download Data