Pine Analytics3time.fun copy3
    Updated 2025-02-14
    -- forked from time.fun @ https://flipsidecrypto.xyz/studio/queries/221bff0b-5071-4b43-a305-0ab2724c3e87

    with tab1 as (
    SELECT
    tx_hash as tx,
    case when ORIGIN_FUNCTION_SIGNATURE like '0x6945b123' then 'Buy'
    when ORIGIN_FUNCTION_SIGNATURE like '0xb51d0534' then 'Sell'
    end AS tx_type
    from base.core.fact_event_logs
    WHERE ORIGIN_TO_ADDRESS like lower('0x428aeF7fB31E4E86162D62d4530a4dd7232D953D')
    and ORIGIN_FUNCTION_SIGNATURE in ('0x6945b123', '0xb51d0534')
    )


    SELECT
    week,
    count(*) as new_trading_wallets,
    sum(new_trading_wallets) over (order by week) as total_trading_wallets

    FROM (
    SELECT
    user,
    min(date_trunc('week', block_timestamp)) as week

    FROM (
    select
    tx_hash,
    'Buy' as tx_type,
    block_timestamp,
    ORIGIN_FROM_ADDRESS as user,
    amount_usd

    from base.core.ez_native_transfers as a
    left outer join tab1
    on tx = tx_hash
    Last run: about 2 months ago
    WEEK
    NEW_TRADING_WALLETS
    TOTAL_TRADING_WALLETS
    1
    2024-11-25 00:00:00.00031839
    2
    2024-09-30 00:00:00.000121526
    3
    2024-07-22 00:00:00.00021182
    4
    2024-08-12 00:00:00.00081197
    5
    2025-01-27 00:00:00.00021848
    6
    2024-10-28 00:00:00.0001631819
    7
    2024-10-14 00:00:00.000631603
    8
    2025-01-06 00:00:00.00021844
    9
    2024-07-15 00:00:00.00021180
    10
    2025-01-13 00:00:00.00011845
    11
    2024-08-26 00:00:00.000681270
    12
    2024-08-19 00:00:00.00051202
    13
    2024-09-16 00:00:00.00061510
    14
    2024-12-09 00:00:00.00011840
    15
    2025-01-20 00:00:00.00011846
    16
    2024-07-29 00:00:00.00021184
    17
    2024-10-07 00:00:00.000141540
    18
    2024-11-18 00:00:00.00031836
    19
    2024-06-24 00:00:00.000231167
    20
    2024-11-04 00:00:00.000121831
    30
    1KB
    106s