Yousefi_1994Gas Guzzlers - Solana Daily Average Gas Spent per Liquidity Transferred
    Updated 2022-12-18
    -------------------------------------solana-------------------------------------

    with solana_fee_transactions as (
    select
    block_timestamp,
    tx_id as tx_hash,
    (fee / 1e9) as fee,
    signers[0] as from_address
    from solana.core.fact_transactions
    where block_timestamp::date > current_date - 31
    ),
    sol_price_usd as (
    select
    recorded_hour::date as days,
    avg(close) as price_usd
    from solana.core.fact_token_prices_hourly
    where symbol = 'MSOL'
    and recorded_hour::date > current_date - 31
    group by days
    ),
    solana_fee_transactions_with_price as (
    select
    gas.*,
    price.price_usd
    from solana_fee_transactions gas
    join sol_price_usd price
    on gas.block_timestamp::date = price.days
    ),
    solana_fee_transactions_fix_price as (
    select
    *,
    fee * price_usd as fee_spent
    from solana_fee_transactions_with_price
    ),
    solana_final_result as (
    select
    Run a query to Download Data