MLDZMNsectors
    Updated 2022-06-24
    with tb1 as (select
    distinct ORIGIN_FROM_ADDRESS as wallets
    from ethereum.core.fact_event_logs
    where ORIGIN_TO_ADDRESS='0x881d40237659c251811cec9c364ef91dc08d300c'
    and EVENT_NAME='Swap')

    select
    LABEL_TYPE,
    LABEL_SUBTYPE,
    count(distinct tx_hash) as number_use

    from ethereum.core.fact_transactions s join ethereum.core.dim_labels b on s.TO_ADDRESS=b.ADDRESS
    where STATUS='SUCCESS'
    and FROM_ADDRESS in (select wallets from tb1)
    and LABEL_SUBTYPE!='token_contract'
    group by 1,2
    Run a query to Download Data