kiichiUntitled Query
    Updated 2022-06-27
    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