Difference between revisions of "Nobel Quiz"
From SQLZOO
(Previous "correct" answer gave 594 as answer, which was clearly wrong...) |
|||
| (2 intermediate revisions by one user not shown) | |||
| Line 60: | Line 60: | ||
{Pick the code that shows the amount of years where no Medicine awards were given | {Pick the code that shows the amount of years where no Medicine awards were given | ||
|type="()"} | |type="()"} | ||
| − | - SELECT COUNT(yr) FROM nobel WHERE | + | - SELECT COUNT(DISTINCT yr) FROM nobel WHERE yr IN (SELECT DISTINCT yr FROM nobel WHERE subject <> 'Medicine') |
| − | + SELECT COUNT(yr) FROM nobel WHERE | + | + SELECT COUNT(DISTINCT yr) FROM nobel WHERE yr NOT IN (SELECT DISTINCT yr FROM nobel WHERE subject = 'Medicine') |
| − | - SELECT | + | - SELECT DISTINCT yr FROM nobel WHERE yr NOT IN (SELECT DISTINCT yr FROM nobel WHERE subject LIKE 'Medicine') |
| − | - SELECT yr FROM nobel WHERE subject | + | - SELECT COUNT(DISTINCT yr) FROM nobel WHERE yr NOT IN (SELECT DISTINCT yr FROM nobel WHERE subject NOT LIKE 'Medicine') |
| − | - SELECT yr FROM nobel WHERE | + | - SELECT COUNT(yr) FROM nobel WHERE yr NOT IN (SELECT DISTINCT yr FROM nobel WHERE subject = 'Medicine') |
| − | + | {Select the result that would be obtained from the following code: SELECT subject, winner FROM nobel WHERE winner LIKE 'Sir%' AND yr LIKE '196%' | |
| + | <table><caption>Table-A</caption><tr><td>Medicine</td><td>John Eccles</td></tr><tr><td>Medicine</td><td>Frank Macfarlane Burnet</td></tr></table> | ||
| + | <table><caption>Table-B</caption><tr><td>Chemistry</td><td>Sir Cyril Hinshelwood</td></tr></table> | ||
| + | <table><caption>Table-C</caption><tr><td>Medicine</td><td>Sir John Eccles</td></tr><tr><td>Medicine</td><td>Sir Frank Macfarlane Burnet</td></tr></table> | ||
| + | <table><caption>Table-D</caption><tr><td>Medicine</td><td>John Eccles</td></tr><tr><td>Medicine</td><td>Frank Macfarlane Burnet</td></tr><tr><td>Chemistry</td><td>Willard F.Libby</td></tr></table> | ||
| + | <table><caption>Table-E</caption><tr><td>Sir John Eccles</td></tr><tr><td>Sir Frank Macfarlane Burnet</td></tr></table> | ||
|type="()"} | |type="()"} | ||
| − | - | + | - Table-A |
| − | - | + | - Table-B |
| − | + | + | + Table-C |
| − | - | + | - Table-D |
| − | - | + | - Table-E |
{Select the code which would show the year when neither a Physics or Chemistry award was given | {Select the code which would show the year when neither a Physics or Chemistry award was given | ||
| Line 91: | Line 96: | ||
{Pick the result that would be obtained from the following code: SELECT subject, COUNT(subject) FROM nobel WHERE yr ='1960' GROUP BY subject | {Pick the result that would be obtained from the following code: SELECT subject, COUNT(subject) FROM nobel WHERE yr ='1960' GROUP BY subject | ||
| + | <table><caption>Table-A</caption><tr><td>1</td></tr><tr><td>1</td></tr><tr><td>2</td></tr><tr><td>1</td></tr><tr><td>1</td></tr></table> | ||
| + | <table><caption>Table-B</caption><tr><td>Chemistry</td><td>6</td></tr></table> | ||
| + | <table><caption>Table-C</caption><tr><td>Chemistry</td><td>3</td></tr><tr><td>Literature</td><td>1</td></tr><tr><td>Medicine</td><td>2</td></tr><tr><td>Peace</td><td>0</td></tr><tr><td>Physics</td><td>2</td></tr></table> | ||
| + | <table><caption>Table-D</caption><tr><td>Chemistry</td><td>1</td></tr><tr><td>Literature</td><td>1</td></tr><tr><td>Medicine</td><td>2</td></tr><tr><td>Peace</td><td>1</td></tr><tr><td>Physics</td><td>1</td></tr></table> | ||
| + | <table><caption>Table-E</caption><tr><td>Chemistry</td><td>1</td></tr><tr><td>Literature</td><td>1</td></tr><tr><td>Peace</td><td>1</td></tr><tr><td>Physics</td><td>1</td></tr></table> | ||
|type="()"} | |type="()"} | ||
| − | - | + | - Table-A |
| − | - | + | - Table-B |
| − | - | + | - Table-C |
| − | + | + | + Table-D |
| − | - | + | - Table-E |
</quiz> | </quiz> | ||
[[Category:Quizzes]] | [[Category:Quizzes]] | ||
Latest revision as of 09:29, 8 March 2013
Nobel Quiz
| yr | subject | winner | ||
|---|---|---|---|---|
| 1960 | Chemistry | Willard F. Libby | ||
| 1960 | Literature | Saint-John Perse | ||
| 1960 | Medicine | Sir Frank Macfarlane Burnet | ||
| 1960 | Medicine | Peter Medawar | ||
| 1960 | Physics | Donald A. Glaser | ||
| 1960 | Peace | Albert Lutuli | ||
| ... | ||||