
Originally Posted by
Andwise
Anyone else have any solutions?
okay, since you asked... 

Originally Posted by
sqlzoo
3a. In which years was the Physics prize awarded but no Chemistry prize. (WARNING - this question is way too hard for this level, you will need to use sub queries or joins).
oh no i won't 
here's my query --
Code:
SELECT yr
FROM nobel
GROUP
BY yr
HAVING COUNT(CASE WHEN subject ='Physics'
THEN 'humpty' END) > 0
AND COUNT(CASE WHEN subject ='Chemistry'
THEN 'dumpty' END) = 0
and here are the results --

Originally Posted by
sqlzoo
Well Done, that is correct.
yr
1917
1919
1924
1933
Bookmarks