datavortexdolphine weekly
    Updated 2024-12-13
    WITH trader_volumes AS (
    SELECT
    s.trader,
    SUM(s.amount_in_usd) AS total_volume,
    COUNT(DISTINCT s.tx_hash) AS total_swaps,
    DATE_TRUNC('week', s.block_timestamp) AS week_start
    FROM
    near.defi.ez_dex_swaps s
    WHERE
    s.block_timestamp >= '2024-01-01'
    AND s.block_timestamp <= '2024-12-31'
    GROUP BY
    s.trader, week_start
    ),
    categorized_traders AS (
    SELECT
    trader,
    total_volume,
    total_swaps,
    week_start,
    CASE
    WHEN total_volume > 10000 AND total_volume <= 99999 THEN 'Dolphins'
    ELSE 'Other'
    END AS trader_category
    FROM
    trader_volumes
    )
    SELECT
    week_start,
    COUNT(DISTINCT trader) AS dolphins_traders,
    SUM(total_swaps) AS total_swaps_by_dolphins,
    SUM(total_volume) AS total_volume_by_dolphins
    FROM
    categorized_traders
    WHERE
    trader_category = 'Dolphins'
    Last run: about 2 hours ago
    WEEK_START
    DOLPHINS_TRADERS
    TOTAL_SWAPS_BY_DOLPHINS
    TOTAL_VOLUME_BY_DOLPHINS
    1
    2024-01-01 00:00:00.0009164492524094.93904784
    2
    2024-01-08 00:00:00.0006370961808896.0485757
    3
    2024-01-15 00:00:00.0005276421703546.53733463
    4
    2024-01-22 00:00:00.0004773171523711.09989855
    5
    2024-01-29 00:00:00.0004953001207589.6453189
    6
    2024-02-05 00:00:00.0004552941354904.12312244
    7
    2024-02-12 00:00:00.0004652771290088.0528617
    8
    2024-02-19 00:00:00.0004082821358567.39032104
    9
    2024-02-26 00:00:00.0007395982077970.81244598
    10
    2024-03-04 00:00:00.00018272995121813.72167767
    11
    2024-03-11 00:00:00.000322146048366673.91090661
    12
    2024-03-18 00:00:00.000156107134226000.96032039
    13
    2024-03-25 00:00:00.000197154345259387.83516159
    14
    2024-04-01 00:00:00.00011892293380809.10467662
    15
    2024-04-08 00:00:00.000139147584157239.697143
    16
    2024-04-15 00:00:00.000118124193352558.33372569
    17
    2024-04-22 00:00:00.000113323733412270.66709759
    18
    2024-04-29 00:00:00.000104248472672335.52823485
    19
    2024-05-06 00:00:00.000103203033299747.08453808
    20
    2024-05-13 00:00:00.000113275783253889.53710928
    53
    3KB
    506s