ben-wyattbase-tx-value-graph
    Updated 2025-01-28
    -- forked from Avalanche-tx-value-graph @ https://flipsidecrypto.xyz/studio/queries/8133a2f0-f254-4096-b62e-2e369ad89ebb

    -- grabs transactions, joins on hourly price data
    -- "Large" transactions are > $100k
    -- Make sure to check what the token of account for the fact_transactions.value column is.
    WITH transaction_data AS (
    SELECT
    value as native_value,
    block_timestamp,
    DATE_TRUNC('hour', block_timestamp) AS rounded_hour,
    from_address
    FROM
    base.core.fact_transactions
    WHERE
    block_timestamp BETWEEN '2022-01-01' AND '2024-12-31 23:59:59' AND
    native_value < 1e14
    ),
    price_data AS (
    SELECT
    symbol,
    price,
    hour
    FROM
    base.price.ez_prices_hourly
    WHERE
    symbol = 'ETH' and
    hour BETWEEN '2022-01-01' AND '2024-12-31 23:59:59'
    ),
    transactions_with_prices AS (
    SELECT
    t.native_value,
    t.rounded_hour,
    t.from_address,
    p.price,
    t.native_value * COALESCE(p.price, 0) AS usd_value,
    DATE_TRUNC('month', t.rounded_hour) AS rounded_month,
    Last run: 3 months ago
    TRANSACTION_MONTH
    TRANSACTION_SIZE
    TX_VALUE_USD
    TX_VALUE_NATIVE
    TX_COUNT
    UNIQUE_USERS
    1
    2023-06-01 00:00:00.000Small25599.06270410513.75169080769020024
    2
    2023-07-01 00:00:00.000Large60394218.161529532241.49208916920567
    3
    2023-07-01 00:00:00.000Small290896572.540939155474.5000640572822017175742
    4
    2023-08-01 00:00:00.000Large714528391.457993400571.6420953292125640
    5
    2023-08-01 00:00:00.000Small1654224398.71912937114.29519042117198180955580
    6
    2023-09-01 00:00:00.000Large301746627.445035186280.3233941011285520
    7
    2023-09-01 00:00:00.000Small2058648538.839141270874.0738237626055686827529
    8
    2023-10-01 00:00:00.000Large174632365.523133105529.052634982769346
    9
    2023-10-01 00:00:00.000Small912715378.45458555016.832057831164574531283443
    10
    2023-11-01 00:00:00.000Large208636216.381752104503.592278987803324
    11
    2023-11-01 00:00:00.000Small672465393.913857339618.8821215158679017691542
    12
    2023-12-01 00:00:00.000Large796875982.05623354805.147724642367684
    13
    2023-12-01 00:00:00.000Small1064576261.49259471135.8047712689208501846152
    14
    2024-01-01 00:00:00.000Large476266534.461637202762.3232952421605483
    15
    2024-01-01 00:00:00.000Small856608669.924474361921.95158520310991986885965
    16
    2024-02-01 00:00:00.000Large561644738.582457209428.9834781221689604
    17
    2024-02-01 00:00:00.000Small1733855915.28581622172.715157802134557011191804
    18
    2024-03-01 00:00:00.000Large2537628972.44601710207.128040701103302435
    19
    2024-03-01 00:00:00.000Small8253081680.878532316615.84918247354029313108721
    20
    2024-04-01 00:00:00.000Large1229889152420950400001048285.115118753009
    37
    3KB
    147s