Difference between revisions of "Nobel Quiz"

From SQLZOO
Jump to: navigation, search
Line 1: Line 1:
 
Nobel Quiz
 
Nobel Quiz
 +
<div class='ref_section' style='float:right'>
 +
<table class='db_ref'>
 +
<caption>nobel</caption>
 +
<th>yr</th>
 +
<th>subject</th>
 +
<th>winner</th>
 +
<tr>
 +
<td>1960</td>
 +
<td>Chemistry</td>
 +
<td align = 'left'>Willard F. Libby</td>
 +
</tr>
 +
<tr>
 +
<td>1960</td>
 +
<td>Literature</td>
 +
<td align = 'left'>Saint-John Perse</td>
 +
</tr>
 +
<tr>
 +
<td>1960</td>
 +
<td>Medicine</td>
 +
<td align = 'left'>Sir Frank Macfarlane Burnet</td>
 +
</tr>
 +
<tr>
 +
<td>1960</td>
 +
<td>Medicine</td>
 +
<td align = 'left'>Peter Medawar</td>
 +
</tr>
 +
<tr>
 +
<td colspan='5'>...</td>
 +
</tr>
 +
</table>
 +
</div>
 
<quiz shuffle=none display=simple>
 
<quiz shuffle=none display=simple>
 
{Pick the code which shows the name of winner's names beginning with C and ending in n
 
{Pick the code which shows the name of winner's names beginning with C and ending in n

Revision as of 08:37, 6 August 2012

Nobel Quiz

nobel
yr subject winner
1960 Chemistry Willard F. Libby
1960 Literature Saint-John Perse
1960 Medicine Sir Frank Macfarlane Burnet
1960 Medicine Peter Medawar
...

<quiz shuffle=none display=simple> {Pick the code which shows the name of winner's names beginning with C and ending in n |type="()"} -A. SELECT name FROM nobel WHERE winner LIKE '%C%' AND winner LIKE '%n%' -B. SELECT name FROM nobel WHERE winner LIKE '%C' AND winner LIKE 'n%' -C. SELECT name FROM nobel WHERE winner LIKE 'C%' AND winner LIKE '%n' -D. SELECT winner FROM nobel WHERE winner LIKE '%C' AND winner LIKE 'n%' +E. SELECT winner FROM nobel WHERE winner LIKE 'C%' AND winner LIKE '%n'

{Select the code that shows how many Chemistry awards were given between 1950 and 1960 |type="()"} -A. SELECT COUNT(subject) FROM nobel WHERE subject = 'Chemistry' AND BETWEEN 1950 and 1960 -B. SELECT COUNT(subject) FROM nobel WHERE subject = 'Chemistry' AND yr BETWEEN (1950, 1960) +C. SELECT COUNT(subject) FROM nobel WHERE subject = 'Chemistry' AND yr BETWEEN 1950 and 1960 -D. SELECT subject FROM nobel WHERE subject = 'Chemistry' AND yr BETWEEN 1950 and 1960 -E. SELECT subject FROM nobel WHERE subject = 'Chemistry' AND yr BETWEEN (1950, 1960)


{Pick the code that shows the amount of years where no Medicine awards were given |type="()"} -A. SELECT COUNT(yr) FROM nobel WHERE subject NOT IN 'Medicine' +B. SELECT COUNT(yr) FROM nobel WHERE subject NOT LIKE 'Medicine' -C. SELECT COUNT(yr) FROM nobel WHERE subject NOT 'Medicine' -D. SELECT yr FROM nobel WHERE subject <> 'Medicine' -E. SELECT yr FROM nobel WHERE subject NOT LIKE 'Medicine'

{Select the code which would show the year when neither a Physics or Chemistry award was given |type="()"} -A. SELECT yr FROM nobel WHERE subject NOT IN(SELECT yr from nobel WHERE subject IN ('Chemistry','Physics')) -B. SELECT yr FROM nobel WHERE subject NOT IN(SELECT subject from nobel WHERE subject IN ('Chemistry','Physics')) +C. SELECT yr FROM nobel WHERE yr NOT IN(SELECT yr from nobel WHERE subject IN ('Chemistry','Physics')) -D. SELECT yr FROM nobel WHERE yr NOT IN(SELECT subject from nobel WHERE subject IN ('Chemistry','Physics')) -E. SELECT yr FROM subject WHERE yr NOT IN(SELECT yr from nobel WHERE subject IN ('Chemistry','Physics'))

{Select the code which shows the years when a Medicine award was given but no Peace or Literature award was |type="()"} -A. SELECT DISTINCT yr FROM nobel WHERE subject='Medicine' and subject NOT IN(SELECT yr from nobel WHERE subject='Literature') and yr NOT IN (SELECT yr FROM nobel WHERE subject='Peace') -B. SELECT DISTINCT yr FROM nobel WHERE subject='Medicine' and yr NOT IN(SELECT yr from nobel WHERE subject='Literature' AND subject='Peace') +C. SELECT DISTINCT yr FROM nobel WHERE subject='Medicine' and yr NOT IN(SELECT yr from nobel WHERE subject='Literature') and yr NOT IN (SELECT yr FROM nobel WHERE subject='Peace') -D. SELECT DISTINCT yr FROM subject WHERE subject='Medicine' and yr NOT IN(SELECT yr from nobel WHERE subject='Literature' and subject='Peace') -E. SELECT DISTINCT yr FROM subject WHERE subject='Medicine' and yr NOT IN(SELECT yr from nobel WHERE subject='Literature') and yr NOT IN (SELECT yr FROM nobel WHERE subject='Peace') </quiz>