Difference between revisions of "BBC QUIZ"

From SQLZOO
Jump to: navigation, search
(Created page with "BBC QUIZ <quiz shuffle=none display=simple> {Which of these gives the name of countries beginning with C? |type="()"} - SELECT name FROM bbc WHERE name BEGIN with C - SELECT n...")
 
Line 35: Line 35:
 
{Which of these coding wouldn't work?
 
{Which of these coding wouldn't work?
 
|type="()"}
 
|type="()"}
+ SELECT name FROM bbc WHERE name = 'United Kingdom' AND name = 'Algeria'
+
- SELECT name FROM bbc WHERE name = 'United Kingdom' AND name = 'Algeria'
 
- SELECT name FROM bbc WHERE name = 'United Kingdom' or name = 'Algeria'
 
- SELECT name FROM bbc WHERE name = 'United Kingdom' or name = 'Algeria'
 +
+ SELECT name FROM bbc WHERE name EITHER ('United Kingdom', 'Algeria')
 
- SELECT name FROM bbc WHERE name IN ('United Kingdom', 'Algeria')
 
- SELECT name FROM bbc WHERE name IN ('United Kingdom', 'Algeria')
- SELECT name FROM bbc WHERE name EITHER ('United Kingdom', 'Algeria')
 
 
- None of the above
 
- None of the above
 
</quiz>
 
</quiz>

Revision as of 12:55, 16 July 2012

BBC QUIZ <quiz shuffle=none display=simple> {Which of these gives the name of countries beginning with C? |type="()"} - SELECT name FROM bbc WHERE name BEGIN with C - SELECT name FROM bbc WHERE name LIKE '%C' - SELECT name FROM bbc WHERE name LIKE '%C%' - SELECT name FROM bbc WHERE name LIKE C + SELECT name FROM bbc WHERE name LIKE 'C%'

{Which of these shows the population of United Kingdom? |type="()"} - SELECT population FROM bbc WHERE name = 'United Kingdom' - SELECT population FROM bbc WHERE name = 'United Kingdom' - SELECT name FROM bbc WHERE name LIKE '%C%' - SELECT name FROM bbc WHERE name LIKE C + SELECT name FROM bbc WHERE name LIKE 'C%'

{What is the problem with this SQL code:SELECT name FROM "bbc" WHERE population > '2000000'? |type="()"} - Apostrophes should be used around 'bbc' instead of speech marks - There are apostrophes surrounding '2000000' + There are speech marks surrounding "bbc" - There are speech marks surrounding "bbc" and there is apostrophes surrounding '2000000' - None of the above

{How would you reveal the name and population of countries in Europe, North America and South America? |type="()"} - SELECT name FROM bbc WHERE region IN ('Europe', 'North America', 'South America') + SELECT name, population FROM bbc WHERE region IN ('Europe', 'North America', 'South America') - SELECT name, population FROM bbc WHERE region IN (Europe North America South America) - SELECT name, population FROM bbc WHERE region IS ('Europe', 'North America', 'South America') - SELECT population FROM bbc WHERE region IN ('Europe', 'North America', 'South America')

{Which of these coding wouldn't work? |type="()"} - SELECT name FROM bbc WHERE name = 'United Kingdom' AND name = 'Algeria' - SELECT name FROM bbc WHERE name = 'United Kingdom' or name = 'Algeria' + SELECT name FROM bbc WHERE name EITHER ('United Kingdom', 'Algeria') - SELECT name FROM bbc WHERE name IN ('United Kingdom', 'Algeria') - None of the above </quiz>