MoeUntitled Query
    Updated 2022-10-03
    with
    base as (

    ( select
    'Remove Liquidity' as type,
    origin_to_address address
    from
    ethereum.core.fact_event_logs
    where
    event_name ilike '%RemoveLiquidity%'
    and contract_address IN (select ADDRESS
    from ethereum.core.dim_labels
    where
    LABEL ILIKE '%sushi%') )
    union all
    ( select
    'Add Liquidity' as type,
    origin_to_address address
    from
    ethereum.core.fact_event_logs
    where
    event_name ilike '%AddLiquidity%'
    and contract_address in (select ADDRESS
    from ethereum.core.dim_labels
    where
    LABEL ILIKE '%sushi%') )

    union all
    (select
    'Borrowing' as type,
    origin_to_address address
    Run a query to Download Data