ben-wyatteth-tx-value-graph
    Updated 2025-01-27
    -- 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
    ethereum.core.fact_transactions
    WHERE
    block_timestamp BETWEEN '2022-01-01' AND '2024-12-31 23:59:59'
    ),
    price_data AS (
    SELECT
    symbol,
    price,
    hour
    FROM
    ethereum.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,
    CASE
    Last run: 3 months ago
    TRANSACTION_MONTH
    TRANSACTION_SIZE
    TX_VALUE_USD
    TX_VALUE_NATIVE
    TX_COUNT
    UNIQUE_USERS
    1
    2022-01-01 00:00:00.000Large147238435519.08649817454.789386515480739636
    2
    2022-01-01 00:00:00.000Small37916103250.792212562114.4947976366963215391486
    3
    2022-02-01 00:00:00.000Large109652966890.00138378015.954385411050927731
    4
    2022-02-01 00:00:00.000Small28572744801.90039990377.90188701326289475270952
    5
    2022-03-01 00:00:00.000Large113165408594.02338917581.785084811414729361
    6
    2022-03-01 00:00:00.000Small27566559765.35549564154.19051214358762407221148
    7
    2022-04-01 00:00:00.000Large106232334422.97334274370.065118311595130792
    8
    2022-04-01 00:00:00.000Small30515819643.74769841648.81017296334836185365313
    9
    2022-05-01 00:00:00.000Large137319287458.35363163801.949689813236128182
    10
    2022-05-01 00:00:00.000Small28069364448.186212387737.5384213348235536033796
    11
    2022-06-01 00:00:00.000Large89466165860.469668173139.9156339710418257
    12
    2022-06-01 00:00:00.000Small15401002185.892911612493.6237708309863974389528
    13
    2022-07-01 00:00:00.000Large70683312639.466352588061.93805337044213475
    14
    2022-07-01 00:00:00.000Small13474825178.377910125944.9870796371038007096691
    15
    2022-08-01 00:00:00.000Large68124738970.324239896291.43470037062815376
    16
    2022-08-01 00:00:00.000Small13587329261.87527954825.05618726348309866739178
    17
    2022-09-01 00:00:00.000Large98666773880.872665754940.7487937186618352
    18
    2022-09-01 00:00:00.000Small12491718749.29448384375.75052131336675426510168
    19
    2022-10-01 00:00:00.000Large48239888763.850634741939.57087175137910836
    20
    2022-10-01 00:00:00.000Small9759489581.832197134772.01736875340711505560790
    72
    6KB
    89s