aureasarsanedesPACT Learn and Earn 2
    Updated 4 hours ago
    WITH daily_participants AS (
    SELECT
    trunc(block_timestamp,'day') as date,
    event_data:recipient as participant
    FROM aptos.core.fact_events
    WHERE payload_function='0xcb14f210bc9294e4e805b638ecfcf75cb5b73070f234687d48e75ace75b75c96::learn_and_earn::claim_reward_with_signature'
    AND event_type='0xcb14f210bc9294e4e805b638ecfcf75cb5b73070f234687d48e75ace75b75c96::learn_and_earn::RewardClaimed'
    AND event_data:campaign_address='0x39b6b89cefcd91f0f506878d32dc900884f1cbd1cad24887f2a0afe39a824c1b'
    ),

    first_participation AS (
    SELECT
    participant,
    MIN(date) as first_date
    FROM daily_participants
    GROUP BY 1
    ),

    cumulative_participants AS (
    SELECT
    date,
    COUNT(DISTINCT participant) as daily_participants,
    SUM(COUNT(DISTINCT participant)) OVER (ORDER BY date) as cumulative_participants
    FROM daily_participants
    GROUP BY 1
    )

    SELECT
    d.date,
    COUNT(DISTINCT d.participant) as "Daily Active Participants",
    COUNT(DISTINCT CASE WHEN d.date = f.first_date THEN d.participant END) as "Daily New Participants",
    c.cumulative_participants as "Cumulative Total Participants",
    COUNT(*) as "Total Daily Actions",
    COUNT(*)/COUNT(DISTINCT d.participant) as "Avg Actions per Participant per Day"
    FROM daily_participants d
    LEFT JOIN first_participation f ON d.participant = f.participant
    Last run: about 4 hours ago
    DATE
    Daily Active Participants
    Daily New Participants
    Cumulative Total Participants
    Total Daily Actions
    Avg Actions per Participant per Day
    1
    2025-04-28 00:00:00.000242435087241
    2
    2025-04-27 00:00:00.000979735063971
    3
    2025-04-26 00:00:00.000336336349663361
    4
    2025-04-25 00:00:00.000180180346301801
    5
    2025-04-24 00:00:00.000404034450401
    6
    2025-04-23 00:00:00.000505034410501
    7
    2025-04-22 00:00:00.000121234360121
    8
    2025-04-21 00:00:00.000959534348951
    9
    2025-04-20 00:00:00.000939334253931
    10
    2025-04-19 00:00:00.000595934160591
    11
    2025-04-18 00:00:00.000343434101341
    12
    2025-04-17 00:00:00.000616134067611
    13
    2025-04-16 00:00:00.000138138340061381
    14
    2025-04-15 00:00:00.000195195338681951
    15
    2025-04-14 00:00:00.000989833673981
    16
    2025-04-13 00:00:00.000777733575771
    17
    2025-04-12 00:00:00.000292292334982921
    18
    2025-04-11 00:00:00.000328328332063281
    19
    2025-04-10 00:00:00.000606606328786061
    20
    2025-04-09 00:00:00.000115115322721151
    53
    2KB
    6s