SniperWeekly Swap Volume & Cumulative Volume [USD]
    Updated 2025-05-09
    with pharaoh as ( select block_timestamp,
    tx_hash,
    origin_from_address,
    pool_name,
    symbol_in,
    symbol_out,
    case when amount_in_usd is null then amount_out_usd
    when amount_out_usd is null then amount_in_usd
    when amount_in_usd>=amount_out_usd then amount_in_usd
    when amount_out_usd>amount_in_usd then amount_out_usd end as amount_usd
    from avalanche.defi.ez_dex_swaps
    where platform like '%pharaoh%'
    )

    select trunc(block_timestamp,'week') as date,
    count(DISTINCT(tx_hash)) as swaps,
    -- count(*) as swaps,
    -- swaps/tx as "Avg Swap per Tx",
    count(DISTINCT(origin_from_address)) as swappers,
    sum(amount_usd) as "Volume",
    sum("Volume") over (order by date asc) as "Cumulative Volume",
    avg(amount_usd) as "Avg Volume Per Swapper",
    swaps/swappers as "Avg Tx Per Swapper",
    avg("Volume") over (order by date rows between 1 preceding and 0 following) as "Moving Average 7D",
    avg("Volume") over (order by date rows between 2 preceding and 0 following) as "Moving Average 14D",
    avg("Volume") over (order by date rows between 4 preceding and 0 following) as "Moving Average 30D"
    from pharaoh
    where amount_usd is not null
    group by 1
    Last run: 14 days ago
    DATE
    SWAPS
    SWAPPERS
    Volume
    Cumulative Volume
    Avg Volume Per Swapper
    Avg Tx Per Swapper
    Moving Average 7D
    Moving Average 14D
    Moving Average 30D
    1
    2023-12-04 00:00:00.000327.577.572.5233333331.57.577.577.57
    2
    2023-12-11 00:00:00.00021833327351214.047351221.612655.7854190756.5753013675610.8053675610.8053675610.805
    3
    2023-12-18 00:00:00.00024553789839317.2217190538.833062.3458512296.4947098595265.635730179.615730179.61
    4
    2023-12-25 00:00:00.000664653713349868.2230540407.051587.0028792212.37616411594592.7210180133.167635101.7625
    5
    2024-01-01 00:00:00.00070855497682470.4838222877.53851.62071610712.90528210516169.3510290551.97333337644575.506
    6
    2024-01-08 00:00:00.000854868110245086.8248467964.35958.11155148212.5521298963778.6510425808.50666679693591.356
    7
    2024-01-15 00:00:00.000579312726844658.5455312622.89905.7375334134.5542458544872.688257405.289592280.256
    8
    2024-01-22 00:00:00.000798917137473829.9762786452.86841.83712214.6637487159244.2558187858.443333339119182.806
    9
    2024-01-29 00:00:00.0007289153410654858.4273441311.281242.1145278624.751639064344.1958324448.976666678580180.846
    10
    2024-02-05 00:00:00.0008859175513407198.8786848510.151248.9239748495.04786312031028.64510511962.429725126.524
    11
    2024-02-12 00:00:00.00011234210820873753.6107722263.751538.4547169815.32922217140476.23514978603.6311850859.88
    12
    2024-02-19 00:00:00.0008161148113716837.99121439101.741409.7469671125.51046617295295.79515999263.486666713225295.77
    13
    2024-02-26 00:00:00.00015658229124218612.69145657714.431362.9699302166.8345718967725.3419603068.093333316574252.314
    14
    2024-03-04 00:00:00.00019551323029363174.11175020888.541343.606392886.05294126790893.422432874.9320315915.452
    15
    2024-03-11 00:00:00.00033553434953559607.93228580496.471445.9937346117.71510741461391.0235713798.243333328346397.264
    16
    2024-03-18 00:00:00.00026689340255991687.05284572183.521867.6346581057.84509154775647.4946304823.0335369983.954
    17
    2024-03-25 00:00:00.00012431317624168469.59308740653.111753.75296353.91404340080078.3244573254.856666737460310.274
    18
    2024-04-01 00:00:00.00012056294922595924.12331336577.231675.5097226754.08816523382196.85534252026.9237135772.56
    19
    2024-04-08 00:00:00.00017974343028419244.26359755821.491386.1693620135.24023325507584.1925061212.656666736946986.59
    20
    2024-04-15 00:00:00.00014327252718453067.48378208888.971084.1353316495.66956923436155.8723156078.6229925678.5
    75
    9KB
    2s