Movement Team1_1. Weekly Address and Transactions
    Updated 1 day ago
    WITH transactions_per_user AS (
    SELECT
    DATE_TRUNC('week', block_timestamp) AS weekly,
    sender,
    COUNT(*) AS tx_count
    FROM movement.core.fact_transactions
    WHERE TX_TYPE = 'user_transaction'
    GROUP BY 1, 2
    ),
    active_users AS (
    -- Filter senders with 3+ transactions per week
    SELECT
    weekly,
    sender
    FROM transactions_per_user
    WHERE tx_count >= 3
    ),
    filtered_transactions AS (
    -- Count transactions made by active users
    SELECT
    DATE_TRUNC('week', t.block_timestamp) AS weekly,
    COUNT(*) AS "Transactions"
    FROM movement.core.fact_transactions t
    JOIN active_users a
    ON DATE_TRUNC('week', t.block_timestamp) = a.weekly
    AND t.sender = a.sender
    WHERE t.TX_TYPE = 'user_transaction'
    GROUP BY 1
    ),
    active_users_count AS (
    -- Count active users per week
    SELECT
    weekly,
    COUNT(DISTINCT sender) AS "Active Addresses"
    FROM active_users
    GROUP BY 1
    Last run: 1 day ago
    WEEKLY
    Transactions
    Active Addresses
    1
    2024-12-09 00:00:00.00012881
    2
    2024-12-16 00:00:00.000107831
    3
    2024-12-23 00:00:00.0001471
    4
    2024-12-30 00:00:00.0001651
    5
    2025-01-06 00:00:00.0001711
    6
    2025-01-13 00:00:00.0001851
    7
    2025-01-20 00:00:00.000371
    8
    2025-02-03 00:00:00.00010411
    9
    2025-02-10 00:00:00.00091944
    10
    2025-02-17 00:00:00.000124436
    11
    2025-02-24 00:00:00.000929883
    12
    2025-03-03 00:00:00.00022093376
    13
    2025-03-10 00:00:00.0001900481720
    14
    2025-03-17 00:00:00.000878742714
    15
    2025-03-24 00:00:00.000830916649
    16
    2025-03-31 00:00:00.000571143323
    17
    2025-04-07 00:00:00.000755791288
    18
    2025-04-14 00:00:00.0001994134632
    19
    2025-04-21 00:00:00.000110551006
    19
    696B
    0s