Check if any of NCBI taxonomy records has missing scientific name
-- Taxonomy check
SELECT T.TAX_ID,
COUNT(T.NAME_CLASS) AS zerocount
FROM TAXONOMY_NAME T
WHERE t.Name_Class = 'scientific name'
GROUP BY T.TAX_ID
HAVING COUNT(T.NAME_CLASS) = 0
-- Find compounds with missing primary names
SELECT DISTINCT L.PUBCHEM_CID
FROM COMPOUND L
LEFT JOIN COMPOUND_NAME I ON L.PUBCHEM_CID = I.PUBCHEM_CID
WHERE I.Pubchem_Cid IS NULL
AND I.TYPE = 'PRI'
order by 1