kaibladeFIFA+ Collect Wallets Stats
    Updated 2023-01-03
    WITH fifaplus_data AS
    (SELECT sales.*, dim.nft_asset_name, dim.name, dim.application_id, dim.drop_number,
    dim.drop_name, dim.item_no, dim.editions, dim.rarity, dim.world_cup_type, dim.year, dim.event_type, dim.player
    FROM algorand.nft.ez_nft_sales_fifa sales
    JOIN algorand.nft.ez_nft_metadata_fifa dim
    ON sales.nft_asset_id = dim.nft_asset_id),

    mints AS
    (
    SELECT *
    FROM fifaplus_data
    WHERE sale_type = 'mint'
    ),

    sales AS
    (
    SELECT *
    FROM fifaplus_data
    WHERE sale_type = 'secondary'
    ),

    minted_bought AS
    (
    SELECT *
    FROM mints
    WHERE purchaser IN (SELECT DISTINCT purchaser FROM sales)
    ),

    fifa_sales_tx AS
    (
    SELECT *
    FROM algorand.core.ez_transaction_asset_transfer
    WHERE tx_group_id IN (SELECT DISTINCT (tx_group_id) FROM sales)
    ),
    raw_tx AS
    Run a query to Download Data