Query editor
-- =====================================================-- ITS Player Count (Daily & Cumulative)-- Defined as unique addresses minting or playing cards-- =====================================================WITH-- 1. Combine all active player events (Minting Cards & Playing Cards)active_events AS (-- Card Mints (Opening Boosters)SELECT evt_block_date AS day, "to" AS address, 'mint' AS event_typeFROM its_megaeth.its_growth_card_evt_cardmintedUNION ALLSELECT evt_block_date AS day, "to" AS address, 'mint' AS event_typeFROM its_megaeth.its_redistrubution_card_evt_cardmintedUNION ALLSELECT evt_block_date AS day, "to" AS address, 'mint' AS event_typeFROM its_megaeth.its_destruction_card_evt_cardmintedWHERE contract_address IN (0x904d73b76df7c4d1a4bb660bbe54af318a4e1412,0x97775ef70f3a733e356d08a232748bb3e5fdfe25)UNION ALL-- Card PlaysSELECT evt_block_date AS day, player AS address, 'play' AS event_typeFROM its_megaeth.its_growth_card_evt_growthcardplayedUNION ALLSELECT evt_block_date AS day, player AS address, 'play' AS event_typeFROM its_megaeth.its_redistrubution_card_evt_redistributioncardplayedUNION ALLSELECT evt_block_date AS day, player AS address, 'play' AS event_typeFROM its_megaeth.its_destruction_card_evt_aggressioncardplayedWHERE contract_address = 0x904d73b76df7c4d1a4bb660bbe54af318a4e1412UNION ALLSELECT evt_block_date AS day, player AS address, 'play' AS event_typeFROM its_megaeth.its_destruction_card_evt_destructioncardplayedWHERE contract_address = 0x97775ef70f3a733e356d08a232748bb3e5fdfe25),-- 2. Daily Active Players (Unique addresses that participated on a given day)daily_active AS (SELECTday,COUNT(DISTINCT address) AS daily_active_players,SUM(CASE WHEN event_type = 'mint' THEN 1 ELSE 0 END) AS total_cards_minted,SUM(CASE WHEN event_type = 'play' THEN 1 ELSE 0 END) AS total_cards_playedFROM active_eventsGROUP BY day),