WITH MintCount AS (
SELECT
project_name,
tokenid,
COUNT(*) AS mint_count -- Counts the number of times each token is minted
FROM ethereum.nft.ez_nft_transfers
WHERE event_type = 'mint'
GROUP BY project_name, tokenid
)
SELECT
project_name,
tokenid,
mint_count
FROM MintCount
WHERE mint_count > 1 -- Filtering for tokens that have been minted more than once
ORDER BY mint_count DESC, project_name;