saber-jlswap vs transfer general stats
    Updated 2022-12-06
    --methode credit to banbannard
    with base as (
    select tx_hash
    from avalanche.core.fact_event_logs
    where event_name = 'Swap'
    and block_timestamp >= '2022-07-01'),

    swap as (
    select
    count(distinct tx_hash) as tx_count,
    count(distinct ORIGIN_FROM_ADDRESS) as uniqe_swapper,
    sum(event_inputs:value/1e6) as Total_Volume,
    avg(event_inputs:value/1e6) as Average_Volume
    from avalanche.core.fact_event_logs
    where contract_address = '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e'
    and event_name = 'Transfer'
    and tx_hash in (select tx_hash from base)
    ),

    transfer as (
    select
    count(distinct tx_hash) as tx_count,
    count(distinct ORIGIN_FROM_ADDRESS) as uniqe_swapper,
    sum(event_inputs:value/1e6) as Total_Volume,
    avg(event_inputs:value/1e6) as Average_Volume
    from avalanche.core.fact_event_logs
    where contract_address = '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e'
    and event_name = 'Transfer'
    and tx_hash not in (select tx_hash from base)
    and block_timestamp >= '2022-07-01')

    select *,'Swaps' as type
    from swap
    union
    select * , 'Transfers' as type
    from transfer
    Run a query to Download Data