AephiaSAGE crafting activity
    Updated 2 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 2 hours agoAuto-refreshes every 12 hours
    DATE
    DAU
    DAU_1W_AVG
    DAU_1M_AVG
    1
    2025-05-08 00:00:00.000518500510
    2
    2025-05-07 00:00:00.000511499510
    3
    2025-05-06 00:00:00.000506498511
    4
    2025-05-05 00:00:00.000489497512
    5
    2025-05-04 00:00:00.000489500513
    6
    2025-05-03 00:00:00.000489500514
    7
    2025-05-02 00:00:00.000499502516
    8
    2025-05-01 00:00:00.000508505518
    9
    2025-04-30 00:00:00.000504505519
    10
    2025-04-29 00:00:00.000504509521
    11
    2025-04-28 00:00:00.000505513522
    12
    2025-04-27 00:00:00.000494516523
    13
    2025-04-26 00:00:00.000500516525
    14
    2025-04-25 00:00:00.000521520527
    15
    2025-04-24 00:00:00.000506515528
    16
    2025-04-23 00:00:00.000531515530
    17
    2025-04-22 00:00:00.000532514532
    18
    2025-04-21 00:00:00.000529512533
    19
    2025-04-20 00:00:00.000496509533
    20
    2025-04-19 00:00:00.000522513535
    ...
    399
    16KB
    171s