kaibladeMost Valuable Card Per Rarity For Archives Collection
    Updated 2023-01-03
    WITH fifaplus_data AS
    (SELECT sales.*, dim.nft_asset_name, dim.name, dim.application_id, dim.drop_number,dim.description,dim.editions,
    dim.drop_name, dim.item_no, dim.rarity, dim.world_cup_type, dim.year, dim.event_type, dim.player, dim.host
    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),

    common_nfts AS
    (SELECT rarity AS "Rarity",name AS "Collectible Name", total_sales_amount_usd AS "Sale Price in USD", block_timestamp AS "Sale Date",
    nft_asset_id AS "Asset ID", description AS "Description", editions AS "Editions",
    world_cup_type AS "World Cup Type", year AS "Year", player AS "Player", event_type AS "Event Type",
    host AS "Host"

    FROM fifaplus_data
    where drop_name = 'archives'
    AND total_sales_amount_usd IS NOT NULL
    AND rarity = 'Common'
    ORDER BY total_sales_amount_usd DESC
    LIMIT 1),

    rare_nfts AS
    (SELECT rarity AS "Rarity", name AS "Collectible Name", total_sales_amount_usd AS "Sale Price in USD", block_timestamp AS "Sale Date",
    nft_asset_id AS "Asset ID", description AS "Description", editions AS "Editions",
    world_cup_type AS "World Cup Type", year AS "Year", player AS "Player", event_type AS "Event Type",
    host AS "Host"

    FROM fifaplus_data
    where drop_name = 'archives'
    AND total_sales_amount_usd IS NOT NULL
    AND rarity = 'Rare'
    ORDER BY total_sales_amount_usd DESC
    LIMIT 1),

    iconic_nfts AS
    (SELECT rarity AS "Rarity", name AS "Collectible Name", total_sales_amount_usd AS "Sale Price in USD", block_timestamp AS "Sale Date",
    nft_asset_id AS "Asset ID", description AS "Description", editions AS "Editions",
    Run a query to Download Data