Moesol gas *
    Updated 2022-11-16
    select
    date_trunc('hour', block_timestamp) as hour ,
    count(distinct TX_ID) as tx_count,
    avg (CLOSE) as sol_price ,
    sum(fee/1e9)*avg (CLOSE) as total_fee_usd,
    total_fee_usd / tx_count as fee_Per_tx,
    count(distinct block_id) as block_count,
    total_fee_usd/block_count as fee_per_block
    FROM
    solana.core.fact_transactions, solana.core.fact_token_prices_hourly
    WHERE date_trunc('hour', block_timestamp) = RECORDED_HOUR
    and symbol = 'SOL'
    and block_timestamp::date>= CURRENT_DATE - 30
    GROUP BY 1
    Run a query to Download Data