Updated 2022-11-17
    with a as(select
    date_trunc('hour',block_timestamp) date,
    count(tx_id) transaction,
    sum(fee)/pow(10,9) fees,
    fees/transaction average
    from solana.core.fact_transactions
    where block_timestamp >= CURRENT_DATE - 30
    group by 1
    ),b as(
    select RECORDED_HOUR,close
    from solana.core.fact_token_prices_hourly where id='5426' and RECORDED_HOUR>= CURRENT_DATE - 30
    )
    select
    date,average*close average_usd_spent_per_transactions
    from a join b on a.date=b.RECORDED_HOUR

    Run a query to Download Data