mlhsushi swaps
    Updated 2022-05-26
    with
    swaps as (
    select
    block_timestamp,
    pool_address,
    pool_name,
    tx_id,
    amount_usd
    from ethereum.dex_swaps
    where platform = 'sushiswap'
    and direction = 'IN'
    ),
    hour24 as (
    select
    date(block_timestamp) as date,

    count(tx_id) as swaps,
    sum(amount_usd) as vol,
    0.25*sum(amount_usd)/100 as fees
    from swaps
    where block_timestamp >= '2022-04-01'
    and amount_usd is not null
    group by 1
    )

    select * from hour24
    limit 100
    Run a query to Download Data