mo115zerion Arbitrum*
    Updated 2023-07-31
    with allw as
    (with txs as (
    --Arbitrum
    (with txsa as (select date_trunc('day',BLOCK_TIMESTAMP) as date, ORIGIN_FROM_ADDRESS as wallet , TX_HASH as txs
    from arbitrum.core.ez_decoded_event_logs
    where EVENT_NAME='Swap'
    and ORIGIN_TO_ADDRESS ='0xd7f1dd5d49206349cae8b585fcb0ce3d96f1696f'),
    ETH as (select date_trunc ('day',HOUR) as date, avg(PRICE)as price
    from ethereum.core.fact_hourly_token_prices
    where SYMBOL = 'WETH'
    group by 1)
    select date,wallet, txs , AMOUNT_USD,'Arbitrum' as network
    from txsa w left join arbitrum.core.ez_token_transfers e on w.txs=e.TX_HASH
    where FROM_ADDRESS in (select ORIGIN_FROM_ADDRESS
    from arbitrum.core.ez_decoded_event_logs
    where EVENT_NAME='Swap'
    and ORIGIN_TO_ADDRESS ='0xd7f1dd5d49206349cae8b585fcb0ce3d96f1696f')
    union
    select w.date, wallet, txs ,(AMOUNT*price) as AMOUNT_USD,'Arbitrum' as network
    from txsa w left join arbitrum.core.ez_eth_transfers e on w.txs=e.TX_HASH
    left join ETH m on w.date=m.date
    where ETH_FROM_ADDRESS in (select ORIGIN_FROM_ADDRESS
    from arbitrum.core.ez_decoded_event_logs
    where EVENT_NAME='Swap'
    and ORIGIN_TO_ADDRESS ='0xd7f1dd5d49206349cae8b585fcb0ce3d96f1696f'))
    )
    select wallet, Count(DISTINCT txs)as transactions, sum(AMOUNT_USD)as volume,network, rank()over( order by volume desc)as Rank_volume,rank()over( order by transactions desc)as Rank_transactions
    from txs
    group by 1,4
    ORDER BY volume DESC)
    select network, transactions, volume as "Volume - USD", Rank_volume, Rank_transactions
    from allw
    WHERE wallet = lower('{{Your_Wallet_Address}}')

    Run a query to Download Data