AephiaSAGE crafting activity
    Updated 5 hours ago
    WITH crafting AS (
    select
    date_trunc('day', block_timestamp::date) as date
    ,count(distinct instruction:accounts[8]) as profiles
    ---------------------------------------------------------------
    from solana.core.fact_events
    WHERE program_id = 'SAGE2HAwep459SNq61LHvjxPk4pLPEJLoMETef7f7EE'
    AND succeeded = 'true'
    AND instruction:accounts[13] = 'CraftndAV62acibnaW7TiwEYwu8MmJZBdyrfyN54nre7'
    AND block_timestamp > '2024-04-01' AND block_timestamp < current_date

    group by 1


    ),

    final AS (
    select
    x.date as date
    ,profiles as dau
    ,round(avg(profiles) OVER (order by date asc rows between 6 preceding and current row)) as dau_1w_avg
    ,round(avg(profiles) OVER (order by date asc rows between 29 preceding and current row)) as dau_1m_avg

    from crafting x
    )


    --SELECT * FROM scanning

    --/*
    SELECT
    date
    ,zeroifnull(dau) as dau
    Last run: about 5 hours agoAuto-refreshes every 12 hours
    DATE
    DAU
    DAU_1W_AVG
    DAU_1M_AVG
    1
    2025-05-21 00:00:00.000522520510
    2
    2025-05-20 00:00:00.000526516511
    3
    2025-05-19 00:00:00.000539512510
    4
    2025-05-18 00:00:00.000547509509
    5
    2025-05-17 00:00:00.000501504507
    6
    2025-05-16 00:00:00.000499506507
    7
    2025-05-15 00:00:00.000508509508
    8
    2025-05-14 00:00:00.000493511508
    9
    2025-05-13 00:00:00.000496514509
    10
    2025-05-12 00:00:00.000518515510
    11
    2025-05-11 00:00:00.000511511509
    12
    2025-05-10 00:00:00.000517508510
    13
    2025-05-09 00:00:00.000523504510
    14
    2025-05-08 00:00:00.000521501510
    15
    2025-05-07 00:00:00.000511499510
    16
    2025-05-06 00:00:00.000506498511
    17
    2025-05-05 00:00:00.000489497512
    18
    2025-05-04 00:00:00.000489500513
    19
    2025-05-03 00:00:00.000489500514
    20
    2025-05-02 00:00:00.000499502516
    ...
    412
    16KB
    62s