h4wkGas as a proxy of activity
    Updated 2022-06-06
    -- Q89. How much did sushi users pay for gas in 2022?
    -- Is there a correlation with the price of ETH? Can you comment on the spikes in the chart?

    select date_trunc(day, s.block_timestamp) as date,
    count(s.tx_hash) as swap_count,
    count(distinct origin_from_address) as unique_swapper,
    sum(cumulative_gas_used/pow(10,9)) as gas_used_eth,
    sum(gas_used_eth) over (order by date asc rows between unbounded preceding and current row) as cumulative_gas,
    avg(price) as eth_price
    from ethereum.sushi.ez_swaps s join ethereum.core.fact_transactions t on s.tx_hash = t.tx_hash
    join ethereum.core.fact_hourly_token_prices p on s.block_timestamp::date = p.hour::date
    where lower(symbol) = 'weth' and s.block_timestamp::date < CURRENT_DATE and s.block_timestamp::date >= '2022-01-01'
    group by date

    Run a query to Download Data