# Difference between revisions of "Nobel Quiz"

From SQLZOO

(Previous "correct" answer gave 594 as answer, which was clearly wrong...) |
|||

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%' | {Select the result that would be obtained from the following code: SELECT subject, winner FROM nobel WHERE winner LIKE 'Sir%' AND yr LIKE '196%' |

## 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 | ||

... |