tkvresearchsexual-purple
    Updated 2 days ago

    select *
    from
    (select datetime,
    cum_token,
    (cum_token/lag(cum_token,1) over (order by datetime) -1)*100 as change_24h,
    (cum_token/lag(cum_token,7) over (order by datetime) -1)*100 as change_7d,
    (cum_token/lag(cum_token,30) over (order by datetime) -1)*100 as change_30d
    from
    (select datetime,
    sum(hash_count) over (order by datetime) as cum_token
    from
    (SELECT date(BLOCK_TIMESTAMP) as datetime,
    COUNT(*) AS hash_count
    FROM bsc.core.fact_transactions
    WHERE (TO_ADDRESS = lower('0xEC4549caDcE5DA21Df6E6422d448034B5233bFbC')
    OR TO_ADDRESS = lower('0x5c952063c7fc8610FFDB798152D69F0B9550762b'))
    AND (ORIGIN_FUNCTION_SIGNATURE LIKE '0xa34aa3d2%'
    OR ORIGIN_FUNCTION_SIGNATURE LIKE '0xe3412e3%'
    OR ORIGIN_FUNCTION_SIGNATURE LIKE '0x55110640%')
    group by 1)))
    where datetime = current_date() -1
    Last run: 2 days ago
    DATETIME
    CUM_TOKEN
    CHANGE_24H
    CHANGE_7D
    CHANGE_30D
    1
    2025-04-23 00:00:00.00029590.27111.335627.2688
    1
    56B
    74s