SquidTotal Stats: volume & fee
    Updated 2025-05-09
    with final_table as (
    WITH token_transfer AS (
    SELECT CAST((data:send:amount) * (data:link:price) AS VARCHAR) AS usd_amount,
    CAST(data:send:fee_value AS VARCHAR) AS fee_usd
    FROM axelar.axelscan.fact_transfers
    WHERE sender_address = '0xce16F69375520ab01377ce7B88f5BA8C48F8D666'
    AND simplified_status = 'received'
    AND created_at::date between '{{Start_Date}}' and '{{End_Date}}'),

    gmp AS (SELECT
    CAST((data:value) AS VARCHAR) AS usd_amount,
    CAST((data:gas:gas_used_amount) * (data:gas_price_rate:source_token.token_price.usd) AS VARCHAR) AS fee_usd
    FROM axelar.axelscan.fact_gmp
    WHERE data:approved:returnValues:contractAddress = '0xce16F69375520ab01377ce7B88f5BA8C48F8D666'
    AND status = 'executed'
    AND event = 'ContractCallWithToken'
    AND simplified_status = 'received'
    AND IS_CALL_FROM_RELAYER = 'false'
    AND IS_INVALID_CALL = 'false'
    AND IS_TWO_WAY = 'false'
    AND gas_status = 'gas_paid_enough_gas'
    AND created_at::date between '{{Start_Date}}' and '{{End_Date}}')

    SELECT * FROM token_transfer
    UNION ALL
    SELECT * FROM gmp)

    select sum(usd_amount) as "Transfers Volume ($USD)", sum(fee_usd) as "Gas Fee ($USD)"
    from final_table
    Last run: about 1 month agoAuto-refreshes every 24 hours
    Transfers Volume ($USD)
    Gas Fee ($USD)
    1
    2822892245.719153380276.18027944
    1
    37B
    15s