elsinaMonthly activity
    Updated 2025-02-26
    with base as (
    SELECT
    block_timestamp,
    origin_from_address,
    tx_hash,
    pool_name,
    CASE
    WHEN amount_in_usd IS NOT NULL AND amount_out_usd IS NOT NULL THEN (amount_in_usd + amount_out_usd) / 2
    ELSE COALESCE(amount_in_usd, amount_out_usd)
    END AS amount
    from
    avalanche.defi.ez_dex_swaps
    where
    platform = 'pangolin' and
    (amount_in_usd IS NOT NULL OR amount_out_usd IS NOT NULL)
    )


    SELECT
    date_trunc('month', block_timestamp) as date,
    count(DISTINCT origin_from_address) as user_count,
    count(DISTINCT tx_hash) as tx_count,
    count(distinct pool_name) as pool_count,
    sum(amount) as total_volume,
    avg(amount) as avg_tx_volume
    from base
    group by 1

    Last run: about 1 month ago
    DATE
    USER_COUNT
    TX_COUNT
    POOL_COUNT
    TOTAL_VOLUME
    AVG_TX_VOLUME
    1
    2021-12-01 00:00:00.000687125763254791600538213.5452280.342525549
    2
    2024-09-01 00:00:00.00012531599413229427008.875137.355881732
    3
    2021-11-01 00:00:00.000611106128944732245672943.152939.01627184
    4
    2024-11-01 00:00:00.0002001011580035223507255.14181.329973773
    5
    2024-05-01 00:00:00.0002677913238332662404762.035419.305122221
    6
    2023-03-01 00:00:00.0001658516343041066975322.35357.766513269
    7
    2021-07-01 00:00:00.000637187213124141356766.8851374.330532157
    8
    2024-01-01 00:00:00.0003035115122838580723167.07471.222065018
    9
    2022-05-01 00:00:00.00039741478456468601840086.051047.487252853
    10
    2022-07-01 00:00:00.00021292256552442130663723.71447.013122332
    11
    2022-12-01 00:00:00.0001903012008140828331823.775202.957296286
    12
    2024-12-01 00:00:00.00014533828636846730513951.41596.886911372
    13
    2021-03-01 00:00:00.00029180318970.37101.991236559
    14
    2024-02-01 00:00:00.00028556158034396112130607.655571.564198831
    15
    2024-03-01 00:00:00.00043276321568419249547029.685695.452208683
    16
    2025-02-01 00:00:00.0002017817522445111947966.8752.005340138
    17
    2023-10-01 00:00:00.0001841210105437421655039.325187.094271193
    18
    2022-03-01 00:00:00.00054957401670486614163185.4751262.471166109
    19
    2022-06-01 00:00:00.00025713360423478241235394.295578.005918887
    20
    2023-06-01 00:00:00.0006964317584540628757492.77146.476031406
    48
    3KB
    5s