Ali3NHolders' Activity Within Flow Chain Over Time (JollyJokers Flow)
    Updated 2023-10-12
    with MintTable as (
    select distinct proposer as Minter,
    sum (1) as Minted_NFTs
    from flow.core.fact_events t1 join flow.core.dim_contract_labels t2 on t1.event_contract = t2.event_contract
    join flow.core.fact_transactions t3 on t1.tx_id = t3.tx_id
    where t1.block_timestamp >= '2022-10-17'
    and t3.tx_succeeded ilike 'true'
    and event_type ilike 'Mint'
    and t1.event_contract ilike '%JollyJokers%'
    group by 1),

    PurchaseTable as (
    select event_data:buyer as Purchaser,
    count (distinct event_data:nftID) as Purchased_NFTs
    from flow.core.fact_events
    where event_data:nftType ilike 'A.699bf284101a76f1.JollyJokers.NFT'
    and event_type ilike 'ListingCompleted'
    and event_data:purchased ilike 'true'
    and tx_succeeded ilike 'true'
    and event_data:salePrice is not null
    and event_data:buyer is not null
    group by 1),

    SalesTable as (
    select distinct event_data:storefrontAddress as Seller,
    count (distinct event_data:nftID) as Sold_NFTs
    from flow.core.fact_events
    where event_data:nftType ilike 'A.699bf284101a76f1.JollyJokers.NFT'
    and event_type ilike 'ListingCompleted'
    and event_data:purchased ilike 'true'
    and tx_succeeded ilike 'true'
    and event_data:salePrice is not null
    and event_data:buyer is not null
    group by 1),

    holderstable as (
    Run a query to Download Data