phu[Sushiswap] correlation between profitability and type of LP Pool
    Updated 2022-08-24
    with
    add_cte as (
    with
    erc20_cte as (
    select
    origin_from_address,
    to_address pool,
    min(block_timestamp) min_block_timestamp,
    sum(amount_usd) amount_usd
    from ethereum.core.ez_token_transfers
    where origin_to_address = '0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f'
    and origin_function_signature in ('0xe8e33700','0xf305d719') -- add liquidity
    and (origin_from_address = from_address or origin_to_address = from_address)
    and amount_usd > 0
    group by 1,2
    )
    ,slp_cte as (
    select
    origin_from_address,
    contract_address pool,
    sum(amount) slp_amount
    from ethereum.core.ez_token_transfers
    where origin_to_address = '0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f'
    and origin_function_signature in ('0xe8e33700','0xf305d719') -- add liquidity
    and from_address = '0x0000000000000000000000000000000000000000'
    and to_address = origin_from_address
    and symbol = 'SLP'
    and amount > 0
    group by 1,2
    )
    select
    origin_from_address,
    pool,
    min_block_timestamp,
    amount_usd,
    slp_amount
    Run a query to Download Data