omer93Sei week transfers
    Updated 2 days ago
    WITH
    valids as (
    select distinct tx_id
    from sei.core.fact_msg_attributes x
    join sei.core.dim_labels y on x.attribute_value=y.address
    where label_type <> 'operator'
    and tx_succeeded='true'
    and block_timestamp>'2024-01-01'
    UNION
    select distinct tx_hash as tx_id
    from sei.core_evm.fact_token_transfers

    ),
    transfers as (
    select distinct block_timestamp, tx_id, receiver, sender
    from sei.core.fact_transfers
    WHERE
    block_timestamp::date < CURRENT_DATE
    and tx_id in (select * from valids)
    and block_timestamp>'2024-01-01'
    AND tx_succeeded = TRUE
    UNION
    select distinct block_timestamp, tx_hash as tx_id, origin_to_address as receiver, origin_from_address as sender
    from sei.core_evm.fact_token_transfers
    ),
    transfer_stats AS (
    SELECT
    DATE_TRUNC('week', block_timestamp) AS week,
    COUNT(DISTINCT tx_id) AS transfers,
    COUNT(DISTINCT receiver) AS receivers,
    COUNT(DISTINCT sender) AS senders
    FROM
    transfers
    GROUP BY
    1
    ORDER BY
    Last run: 2 days ago
    TIME
    TRANSFERS
    TOTAL_TRANSFERS
    RECEIVERS
    SENDERS
    TRANSFERS_PCT_DIFF
    1
    2025-01-13 00:00:00.00093662318263341422544811623.7109
    2
    2025-01-06 00:00:00.00075710617326718264825266515.125
    3
    2024-12-30 00:00:00.000657638165696122599137156-24.679
    4
    2024-12-23 00:00:00.0008731141591197421861204827-27.9858
    5
    2024-12-16 00:00:00.00012124201503886071071905456.7414
    6
    2024-12-09 00:00:00.0001135848138264403547193896-12.4891
    7
    2024-12-02 00:00:00.0001297951126905923743298137-5.0251
    8
    2024-11-25 00:00:00.000136662611392641170874293651.7331
    9
    2024-11-18 00:00:00.0001343345100260154251349779103.8621
    10
    2024-11-11 00:00:00.000658948868267030549822958.1242
    11
    2024-11-04 00:00:00.0004167288023722319847496-2.0749
    12
    2024-10-28 00:00:00.00042555876069942007688268-14.5203
    13
    2024-10-21 00:00:00.00049784771814361572711000023.0172
    14
    2024-10-14 00:00:00.000404697668358974107000845.4881
    15
    2024-10-07 00:00:00.0002781656278892367523236-2.0535
    16
    2024-09-30 00:00:00.00028399760007274065168078.0938
    17
    2024-09-23 00:00:00.000262732571673052851401928.647
    18
    2024-09-16 00:00:00.0002042275453998484212273-4.1111
    19
    2024-09-09 00:00:00.0002129835249771433412630-49.6261
    20
    2024-09-02 00:00:00.0004228045036788360114451-28.1061
    55
    3KB
    392s