winnie-fsPinnacle_Fact_Events Minted Open Edition - Princess
    Updated 2024-01-12
    -- forked from Pinnacle_Fact_Events Minted Starter Edition @ https://flipsidecrypto.xyz/edit/queries/fa9223c5-ff3f-4085-a08b-67a751910156

    WITH EditionCounts AS (
    SELECT
    EVENT_DATA:editionID::STRING AS "EditionID",
    COUNT(*) AS "EditionCount",
    EVENT_DATA:renderID AS "Shape"
    FROM
    flow.core.fact_events
    WHERE
    EVENT_CONTRACT = 'A.edf9df96c92f4595.Pinnacle'
    AND EVENT_TYPE = 'PinNFTMinted'
    -- AND "Shape" ILIKE 'OEV1%'
    -- AND "Shape" ILIKE 'SEV1-MNF%'
    AND "Shape" ILIKE 'OEV1-PRIN%'

    GROUP BY
    EVENT_DATA:editionID::STRING,
    EVENT_DATA:renderID
    ),
    Shapes AS (
    SELECT
    EVENT_DATA:id::STRING AS "ID",
    2023 AS "seriesID",
    EVENT_DATA:renderID AS "Shape",
    EVENT_DATA:variant AS "Variant",
    EVENT_DATA:isChaser AS "Chaser",
    EVENT_DATA:setID AS "SetID"
    FROM
    flow.core.fact_events
    WHERE
    EVENT_CONTRACT = 'A.edf9df96c92f4595.Pinnacle'
    AND EVENT_TYPE = 'EditionCreated'
    ),
    Sets AS (
    QueryRunArchived: QueryRun has been archived