eferfanQ2 (ETH flow)
    Updated 2022-07-26
    with tx1 as (
    SELECT tx_hash , from_address as wallet
    from ethereum.core.ez_token_transfers
    where to_ADDRESS = '0x0000000000000000000000000000000000000000'
    and symbol = 'SLP'

    ) ,
    tx2 as (
    SELECT A.tx_hash
    from ethereum.core.ez_token_transfers A , tx1 B
    where symbol = 'USDC'
    and from_address= wallet
    and A.tx_hash = B.tx_hash

    ) ,
    tx3 as (
    SELECT A.tx_hash ,block_timestamp::date as daily , max(amount) as volume
    from ethereum.core.ez_token_transfers A , tx2 B , tx1 C
    where A.tx_hash = B.tx_hash
    and C.tx_hash = B.TX_hash
    and symbol = 'WETH'
    and from_address = wallet
    GROUP by 1 , 2
    ) ,
    tx4 as (
    SELECT daily, sum(volume) as remove
    from tx3 D
    GROUP by 1
    )
    , tx5 as (
    SELECT tx_hash , to_address as wallet
    from ethereum.core.ez_token_transfers
    where FROM_ADDRESS = '0x0000000000000000000000000000000000000000'
    and symbol = 'SLP'
    Run a query to Download Data