granadohoWhale Swap Volume over Time
    Updated 2022-02-11
    with pools as (
    select
    pool_address
    from ethereum.dex_liquidity_pools
    where platform = 'sushiswap'
    ),price as (
    select
    *
    from (
    select
    price,
    symbol,
    token_address,
    hour,
    ROW_NUMBER() OVER (PARTITION by token_address order by hour desc) col
    from ethereum.token_prices_hourly
    ) a
    where a.col = 1
    ), swap_list as (
    select
    distinct tx_id
    from ethereum.dex_swaps
    where platform = 'sushiswap'
    and pool_address in (select * from pools)
    ), udm_swap_filter as (
    select
    *
    from (
    select
    *,
    ROW_NUMBER() OVER (PARTITION by tx_id order by block_timestamp asc) col
    from (
    select
    *
    from ethereum.udm_events
    where (amount is not null or amount != 0)
    Run a query to Download Data