hbd1994Protocol Overview
    Updated 2022-09-18
    with tab1 as (with swap as (select
    'Swap' as type,
    *
    from arbitrum.core.fact_event_logs
    where contract_address = lower ('0xaBBc5F99639c9B6bCb58544ddf04EFA6802F4064')
    and event_name = 'Swap'
    and tx_status= 'SUCCESS'),
    lp as (select
    'LP' as type,
    *
    from arbitrum.core.fact_event_logs
    where origin_to_address = '0xa906f338cb21815cbc4bc87ace9e68c87ef8d8f1'
    and tx_status= 'SUCCESS'),
    trade as (select
    'Trade' as type,
    *
    from arbitrum.core.fact_event_logs
    where origin_to_address = lower('0x3D6bA331e3D9702C5e8A8d254e5d8a285F223aba')
    and tx_status= 'SUCCESS'
    )


    select * from swap
    union
    select * from lp
    union
    select * from trade)

    select
    count(distinct tab1.origin_from_address) as users_count,
    count(distinct tab1.tx_hash) as txs_count,
    sum(TX_FEE) as fess_paid
    from tab1
    inner join arbitrum.core.fact_transactions on fact_transactions.tx_hash=tab1.tx_hash

    Run a query to Download Data