superflyunpleasant-apricot
    Updated 2025-04-08
    with token_prices as (
    select
    date_trunc('day', hour)::date as date,
    symbol,
    median(price) as price_usd
    from ethereum.price.ez_prices_hourly
    where symbol in ('NEP','ENA','SWELL','WETH','KING','SURF','WSTETH','SWETH','USDE','SUSDE','RSWETH','RSETH','SWBTC','PZETH','WEETH')
    and date_trunc('day', hour) >= '2024-12-02'
    group by 1, 2
    ),
    ambient_contract_txns as (
    select tx_hash
    from swell.core.fact_event_logs
    where contract_address = '0xaaaaaaaa82812f0a1f274016514ba2ca933bf24d'
    ),
    transaction_indexes as (
    select
    tx_hash,
    min(event_index) as first_event_index,
    max(event_index) as last_event_index
    from swell.core.ez_decoded_event_logs
    join ambient_contract_txns using (tx_hash)
    group by 1
    ),
    single_event_txns as (
    select
    block_timestamp::date as transaction_date,
    tx_hash,
    ORIGIN_FROM_ADDRESS as wallet_address,
    c.SYMBOL as input_token_symbol,
    decoded_log:"value" / pow(10, DECIMALS) as input_token_amount,
    input_token_amount * price_usd as input_token_amount_usd,
    null as output_token_symbol,
    null as output_token_amount,
    null as output_token_amount_usd
    from swell.core.ez_decoded_event_logs
    Last run: 19 days ago
    TRANSACTION_DATE
    DAILY_TRANSACTIONS
    DAILY_TRADERS
    DAILY_VOLUME_USD
    CUMULATIVE_VOLUME_USD
    AVG_TRADE_SIZE_USD
    MEDIAN_TRADE_SIZE_USD
    MAX_TRADE_SIZE_USD
    UNIQUE_INPUT_TOKENS
    UNIQUE_OUTPUT_TOKENS
    1
    2024-12-24 00:00:00.0001481.1045351241.1045351240.18408918730.21556373730.321927233933
    2
    2024-12-25 00:00:00.0001441054.261231055.365765124351.42041173.9705869.852521
    3
    2024-12-26 00:00:00.000441055.36576512411
    4
    2024-12-27 00:00:00.000431055.36576512412
    5
    2024-12-28 00:00:00.00011753.1368751808.502640124753.136875753.136875753.13687511
    6
    2024-12-29 00:00:00.000546.140088911814.6427290336.140088916.140088916.1400889121
    7
    2024-12-30 00:00:00.000111814.64272903301
    8
    2025-01-01 00:00:00.0001361328.9338556613143.576584694110.74448797298.150263678442.5614170723
    9
    2025-01-02 00:00:00.0001081413.1100715164556.68665621157.0122301680.03613519374931.02099806722
    10
    2025-01-03 00:00:00.00014111401.7103718255958.397028035116.8091976520.006837854567481.61315939123
    11
    2025-01-04 00:00:00.00063139.31466097.711628035139.3146139.3146139.314622
    12
    2025-01-05 00:00:00.000440.33995247866098.0515805140.16997623930.16997623930.339711811
    13
    2025-01-06 00:00:00.00086637.9546137036736.006194216637.954613703637.954613703637.95461370324
    14
    2025-01-07 00:00:00.000876930.18620681113666.1924010281732.5465517031741.9229075053446.30732
    15
    2025-01-08 00:00:00.0001282103.16049719315769.352898221525.790124298520.7478587351061.66464550252
    16
    2025-01-09 00:00:00.00022101360.77765774117130.130555962123.70705979583.286195277.6206533
    17
    2025-01-10 00:00:00.00018920.16603998317150.2965959452.5207549980.291438639.02084768443
    18
    2025-01-11 00:00:00.0008513.69900582117163.9956017672.7398011640.619652480311.48973396443
    19
    2025-01-12 00:00:00.00015948.65977219517212.6553739628.1099620323.1425297726.136573754
    20
    2025-01-13 00:00:00.00016103833.13458062821045.789954589255.54230537518.7056127042482.73192248123
    ...
    105
    11KB
    14s