kingnedu$GUI INU analysis
    Updated 2025-01-20
    WITH gnudex AS (
    select
    Block_timestamp,
    tx_hash,
    platform,
    swapper,
    amount_in_usd,
    amount_out_usd
    from aptos.defi.ez_dex_swaps
    where token_in = '0xe4ccb6d39136469f376242c31b34d10515c8eaaa38092f804db8e08a8f53c5b2::assets_v1::EchoCoin002'
    OR
    token_out = '0xe4ccb6d39136469f376242c31b34d10515c8eaaa38092f804db8e08a8f53c5b2::assets_v1::EchoCoin002'
    )


    SELECT
    DATE_TRUNC('day', Block_timestamp) AS date,
    DATE_TRUNC('week', Block_timestamp) AS week,
    COUNT(DISTINCT tx_hash) AS "Total Number of transactions",
    SUM(coalesce(amount_in_usd,amount_out_usd)) AS usd_volume,
    COUNT(DISTINCT swapper) AS swappers,
    SUM(swappers) OVER (ORDER BY date) AS cum_swappers,
    SUM("Total Number of transactions") OVER (ORDER BY date) AS cum_transactions,
    SUM(usd_volume) OVER (ORDER BY date) AS cum_volume,
    FROM gnudex
    GROUP BY 1,2
    ORDER BY 1 DESC,2






    QueryRunArchived: QueryRun has been archived