rackhaelBarbie Mints STATS
    Updated 2023-10-28
    with base as (
    select
    BLOCK_TIMESTAMP as date,
    tx_id,
    EVENT_DATA:id as nft_id,
    try_parse_json(EVENT_DATA:metadata) as metadata
    from flow.core.fact_events
    where event_contract = 'A.e5bf4d436ca23932.BBxBarbiePack'
    and EVENT_TYPE = 'Mint'
    and TX_SUCCEEDED = 'true'),

    base3 as
    (select
    tx_id,
    EVENT_DATA:to as minter
    from flow.core.fact_events
    where event_contract = 'A.e5bf4d436ca23932.BBxBarbiePack'
    and EVENT_TYPE = 'Deposit'
    and tx_id in (select distinct tx_id from base))

    select
    count(*) as actions,
    count(distinct tx_id) as mint_txs,
    count(distinct nft_id) as minted_nfts,
    (minted_nfts * 20) as mint_usd_volume,
    count(distinct minter) as minters
    from base
    join base3 using(tx_id)


    Run a query to Download Data