Updated 2023-04-16
    -- forked from @ https://flipsidecrypto.xyz/edit/queries/e5d178f6-a617-4ef6-9ecf-75dcf2089ee6

    -- forked from @ https://flipsidecrypto.xyz/edit/queries/d37f261f-18bf-44d5-9281-0a08d9107df7

    SELECT
    case when PROJECT_NAME is not null then PROJECT_NAME
    else 'other' end as "Project" ,
    sum(round(TX_FEE,'4')) as "Fee in AVAX" ,
    COUNT(DISTINCT tx_hash) as "Transactions"
    FROM
    gnosis.core.dim_labels
    right JOIN gnosis.core.fact_transactions
    ON ADDRESS = TO_ADDRESS
    WHERE --STATUS = 'SUCCESS'
    FROM_ADDRESS = lower('{{address}}')
    --and block_timestamp::date > '{{From_date}}'
    --and LABEL_SUBTYPE !='token_contract'
    GROUP BY 1 order by 3 desc












    Run a query to Download Data