maybeyonasswap_vol_hourly_direct
    Updated 2022-06-12
    with swaps as(
    select
    block_timestamp,
    tx_id,
    split(pool_name,'-')[0]::string as pool_name,
    split(pool_name,'.')[0]::string as chain_name,
    from_amount_usd as amt,
    liq_fee_rune_usd as lp_fee
    from thorchain.swaps
    )

    select
    hour(block_timestamp) as hour_stamp,
    pool_name,
    chain_name,
    count(tx_id) as swaps,
    sum(amt) as usd_vol,
    sum(lp_fee) as fee_usd_vol
    from swaps
    group by 1,2,3
    order by hour_stamp
    -- limit 100

    Run a query to Download Data