Hossein2023-07-09 03:54 PM
    with t as (
    select
    tx_hash,
    block_timestamp,
    'Mint' as type,
    symbol,
    origin_from_address as user,
    amount
    from avalanche.core.ez_token_transfers
    where origin_to_address = '0xc4729e56b831d74bbc18797e0e17a295fa77488c'
    and contract_address = '0xf7d9281e8e363584973f946201b82ba72c965d27'
    and origin_from_address = to_address
    and amount > 0


    union all

    select
    tx_hash,
    block_timestamp,
    'Burn' as type,
    symbol,
    origin_from_address as user,
    amount
    from avalanche.core.ez_token_transfers
    where origin_to_address = '0xc4729e56b831d74bbc18797e0e17a295fa77488c'
    and contract_address = '0xf7d9281e8e363584973f946201b82ba72c965d27'
    and origin_from_address = from_address
    and amount > 0
    )

    select
    type,
    count(distinct tx_hash) as transactions,
    count(distinct user) as users,
    sum(amount) as volume,
    Run a query to Download Data