Query editor
with purchases as (selectdate_format(block_time, '%Y-%m-%d %H:00:00') AS hour_interval, count(*) as n_buy_transactions, round(sum(amount_usd), 2) as total_value_bought, round(avg(amount_usd), 2) as avg_buy, count(distinct taker) as unique_buyers, count(tx_hash) as n_buysfrom uniswap.tradeswheretoken_bought_symbol = 'HIGHER'and block_time >= now() - interval '7' daygroup by1),sells as (selectdate_format(block_time, '%Y-%m-%d %H:00:00') AS hour_interval, count(*) as n_sell_transactions, round(sum(amount_usd), 2) as total_value_sold, round(avg(amount_usd), 2) as avg_sell, count(distinct taker) as unique_sellers, count(tx_hash) as n_sellsfrom uniswap.tradeswheretoken_sold_symbol = 'HIGHER'and block_time >= now() - interval '7' daygroup by1)selectp.hour_interval, total_value_bought, total_value_sold, avg_buy, avg_sell, round(avg_buy / avg_sell, 2) as avg_buy_sell_ratio, n_buys, unique_buyers, n_sells, unique_sellersfrom purchases pjoin sells son p.hour_interval = s.hour_intervalorder byp.hour_interval desc-- order by block_time asc-- limit 100