-
problem with a self join...
I'm a newbie in sql queries and don't know how to solve the following question:
are there subclasses in which ALL chemicals have a MolMass < 400 ?
relation given (prim. key: ChemID):
Chemicals (ChemID, Name, MolMass, SubclassID)
Many thanks
-
SELECT DISTINCT SubClassID
FROM Chemicals c
WHERE SubClassID NOT IN (
SELECT SubClassID
FROM Chemicals s
WHERE MolMass >= 400
GROUP BY SubClassID)
-
many thanks for your help !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|