banbannardMerge Sushiswap LP 9
    Updated 2022-10-03
    with base as (select
    date_trunc('day', block_timestamp) as day,
    origin_from_address,
    sum(amount_usd) as USD_Volume
    from ethereum.core.ez_eth_transfers
    where day > '2022-09-02'
    -- from pools
    and eth_from_address in (select contract_address
    from ethereum.sushi.ez_swaps)
    -- not swaps
    and tx_hash not in (select tx_hash
    from ethereum.sushi.ez_swaps
    where block_timestamp > '2022-09-02')
    group by 1,2

    union
    select
    date_trunc('day', block_timestamp) as day,
    origin_from_address,
    sum(amount_usd) as USD_Volume
    from ethereum.core.ez_token_transfers
    where day > '2022-09-02'
    -- from pools
    and from_address in (select contract_address
    from ethereum.sushi.ez_swaps)

    -- not swaps
    and tx_hash not in (select tx_hash
    from ethereum.sushi.ez_swaps
    where block_timestamp > '2022-09-02')
    group by 1,2)

    select origin_from_address,
    Run a query to Download Data