Hessishliq-av - yyAVAX mints daily net avg
    Updated 2024-08-30
    with savax_mints as

    (
    SELECT BLOCK_TIMESTAMP::date as date, SYMBOL as token, AMOUNT, AMOUNT_USD,
    tx_hash, to_address
    from avalanche.core.ez_token_transfers
    where BLOCK_TIMESTAMP::date >= '2024-01-01 00:00:00.000'
    and origin_to_address = '0xc4729e56b831d74bbc18797e0e17a295fa77488c'
    and contract_address = '0xf7d9281e8e363584973f946201b82ba72c965d27'
    and origin_from_address = to_address and amount > 0),


    savax_burns as (

    SELECT BLOCK_TIMESTAMP::date as date, SYMBOL as token, AMOUNT , AMOUNT_USD ,
    tx_hash , from_address
    from avalanche.core.ez_token_transfers
    where BLOCK_TIMESTAMP::date >= '2024-01-01 00:00:00.000'
    and origin_to_address = '0xc4729e56b831d74bbc18797e0e17a295fa77488c'
    and contract_address = '0xf7d9281e8e363584973f946201b82ba72c965d27'
    and origin_from_address = from_address and amount > 0),

    mint_all as (SELECT date, token, sum(AMOUNT) as "Volume($sAVAX)", sum(AMOUNT_USD) as "Volume(USD)",
    count(DISTINCT to_address) as minters, count(DISTINCT tx_hash) as mints
    from savax_mints
    GROUP by all ) ,

    burn_all as (SELECT date as date2, token as tk2, sum(AMOUNT) as "bVolume($sAVAX)", sum(AMOUNT_USD) as "bVolume(USD)",
    count(DISTINCT from_address) as burners, count(DISTINCT tx_hash) as burns
    from savax_burns
    GROUP by all )

    SELECT sum("Volume($sAVAX)")/count(DISTINCT date) as "Volume in $sAVAX", sum("Volume(USD)") /count(DISTINCT date) as "Volume in USD" , 'Mints' as type
    from mint_all


    QueryRunArchived: QueryRun has been archived