alirsAlgo price and algo transaction and transfer
    Updated 2022-07-01
    with number_of_transaction as(select count(tx_id) as nof_transaction,BLOCK_TIMESTAMP::date as day
    from flipside_prod_db.algorand.transactions
    where asset_id = 0
    and BLOCK_TIMESTAMP >= CURRENT_DATE-180
    GROUP BY 2
    order by 2),number_of_transfer as(select count(tx_id) as nof_transfer,BLOCK_TIMESTAMP::date as day
    from flipside_prod_db.algorand.transfers
    where asset_id = 0
    and BLOCK_TIMESTAMP >= CURRENT_DATE-180
    GROUP BY 2
    order by 2),Algo_price as(
    select
    distinct block_hour::date as day
    ,avg(price_usd) as avg_Algo_Price
    from flipside_prod_db.algorand.prices_swap
    where asset_id = 0
    and block_hour >= CURRENT_DATE-180
    GROUP BY 1
    order by 1)
    select number_of_transaction.day,number_of_transaction.nof_transaction as Number_of_Transactions,
    number_of_transfer.nof_transfer as Number_of_Transfer,algo_price.avg_Algo_Price
    from number_of_transaction
    join number_of_transfer on number_of_transaction.day=number_of_transfer.day
    join algo_price on algo_price.day=number_of_transfer.day

    Run a query to Download Data