Difference between revisions of "QUIZ BBC"

From SQLZOO
Jump to: navigation, search
(Created page with "BBC QUIZ <div class='ref_section'> <table class='db_ref'> <caption>bbc</caption> <tr> <th>name</th> <th>region</th> <th>area</th> <th>population</th> <th>gdp</th> </tr> <tr> <...")
 
Line 1: Line 1:
BBC QUIZ
+
QUIZ BBC
 
<div class='ref_section'>
 
<div class='ref_section'>
 
<table class='db_ref'>
 
<table class='db_ref'>
Line 74: Line 74:
  
 
<quiz shuffle=none display=simple>
 
<quiz shuffle=none display=simple>
{Select the code which gives the name of countries beginning with U
+
{Sélectionnez le code qui donne le nom des pays commençant par U
 
|type="()"}
 
|type="()"}
 
- SELECT name FROM bbc WHERE name BEGIN with C
 
- SELECT name FROM bbc WHERE name BEGIN with C
Line 82: Line 82:
 
+ SELECT name FROM bbc WHERE name LIKE 'U%'
 
+ SELECT name FROM bbc WHERE name LIKE 'U%'
  
{Select the code which shows just the population of United Kingdom?
+
{Sélectionnez le code donnant juste la population de of United Kingdom?
 
|type="()"}
 
|type="()"}
 
- SELECT name FROM bbc WHERE name Like 'United%'
 
- SELECT name FROM bbc WHERE name Like 'United%'
Line 90: Line 90:
 
- SELECT population FROM bbc WHERE name = United Kingdom
 
- SELECT population FROM bbc WHERE name = United Kingdom
  
{Select the answer which shows the problem with this SQL code:SELECT name FROM "bbc" WHERE population > '2000000'
+
{Choisissez la réponse qui explique le problème de la requête SQL:SELECT name FROM "bbc" WHERE population > '2000000'
 
|type="()"}
 
|type="()"}
- Apostrophes should be used around 'bbc' instead of speech marks
+
- Les apostrophes devraient être utilisée autour de 'bbc' au lieu des guillemets
- There are apostrophes surrounding '2000000'
+
- Il y a des apostrophes atour de '2000000'
- There are speech marks surrounding "bbc"
+
- Il y a des guillemets autour de "bbc"
+ There are speech marks surrounding "bbc" and there are apostrophes surrounding '2000000'
+
+ Il y a des guillemets autour de "bbc" et des apostrophes atour de '2000000'
- The use of a WHERE function is incorrect
+
- L'utilisation de WHERE est incorrecte
  
{Select the result that would be obtained from the following code: SELECT name, population / 10 FROM bbc WHERE population < 10000
+
{Sélectionnez le résultat que vous obtiendriez avec le code suivant: SELECT name, population / 10 FROM bbc WHERE population < 10000
 
<table style='float:left'><caption>Table-A</caption><tr><td>Andorra</td><td>6400</td></tr><tr><td>Nauru</td><td>990</td></tr></table>
 
<table style='float:left'><caption>Table-A</caption><tr><td>Andorra</td><td>6400</td></tr><tr><td>Nauru</td><td>990</td></tr></table>
 
<table style='float:left'><caption>Table-B</caption><tr><td>Andorra</td><td>64000</td></tr><tr><td>Nauru</td><td>9900</td></tr></table>
 
<table style='float:left'><caption>Table-B</caption><tr><td>Andorra</td><td>64000</td></tr><tr><td>Nauru</td><td>9900</td></tr></table>
Line 111: Line 111:
 
- Table-E
 
- Table-E
  
{Select the code which would reveal the name and population of countries in Europe, North America and South America
+
{Sélectionnez le code qui affiche le nom et la population des pays Europe, North America and South America
 
|type="()"}
 
|type="()"}
 
- SELECT name FROM bbc WHERE region IN ('Europe', 'North America', 'South America')
 
- SELECT name FROM bbc WHERE region IN ('Europe', 'North America', 'South America')
Line 119: Line 119:
 
- SELECT population FROM bbc WHERE region IN ('Europe', 'North America', 'South America')
 
- SELECT population FROM bbc WHERE region IN ('Europe', 'North America', 'South America')
  
{Select the code which would give two rows
+
{Sélectionnez le code qui donne deux résultats
 
|type="()"}
 
|type="()"}
 
- SELECT name FROM bbc WHERE name = 'United Kingdom'
 
- SELECT name FROM bbc WHERE name = 'United Kingdom'
Line 127: Line 127:
 
- SELECT name FROM WHERE name IS 'Scotland'
 
- SELECT name FROM WHERE name IS 'Scotland'
  
{Select the result that would be obtained from this code:  
+
{Sélectionnez le résultat obtenu avec le code:  
 
<source lang='SQL'>SELECT name FROM bbc WHERE region = 'South America' AND population > 40000000</source>
 
<source lang='SQL'>SELECT name FROM bbc WHERE region = 'South America' AND population > 40000000</source>
 
<table style='float:left'><caption>Table-A</caption><tr><td>Afghanistan</td></tr><tr><td>Brazil</td></tr><tr><td>Colombia</td></tr></table>
 
<table style='float:left'><caption>Table-A</caption><tr><td>Afghanistan</td></tr><tr><td>Brazil</td></tr><tr><td>Colombia</td></tr></table>

Revision as of 14:22, 20 December 2012

QUIZ BBC

</tr>
bbc
name region area population gdp
Afghanistan South Asia 652225 26000000
Albania Europe 28728 3200000 6656000000
Algeria Middle East 2400000 32900000 75012000000
Andorra Europe 468 64000
Brazil South America 8550000 182800000 564852000000
Colombia South America 1140000 45600000
Nauru Asia-Pacific 21 9900
Uzbekistan Central Asia 447000 26000000
...

<quiz shuffle=none display=simple> {Sélectionnez le code qui donne le nom des pays commençant par U |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 U + SELECT name FROM bbc WHERE name LIKE 'U%'

{Sélectionnez le code donnant juste la population de of United Kingdom? |type="()"} - SELECT name FROM bbc WHERE name Like 'United%' - SELECT name FROM bbc WHERE population = 'United Kingdom' - SELECT name, population FROM bbc WHERE name = 'United Kingdom' + SELECT population FROM bbc WHERE name = 'United Kingdom' - SELECT population FROM bbc WHERE name = United Kingdom

{Choisissez la réponse qui explique le problème de la requête SQL:SELECT name FROM "bbc" WHERE population > '2000000' |type="()"} - Les apostrophes devraient être utilisée autour de 'bbc' au lieu des guillemets - Il y a des apostrophes atour de '2000000' - Il y a des guillemets autour de "bbc" + Il y a des guillemets autour de "bbc" et des apostrophes atour de '2000000' - L'utilisation de WHERE est incorrecte

{Sélectionnez le résultat que vous obtiendriez avec le code suivant: SELECT name, population / 10 FROM bbc WHERE population < 10000

Table-A
Andorra6400
Nauru990
Table-B
Andorra64000
Nauru9900
Table-C
Nauru99
Table-D
Nauru990
Table-E
Nauru9900

|type="()"} - Table-A - Table-B - Table-C + Table-D - Table-E

{Sélectionnez le code qui affiche le nom et la population des pays 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')

{Sélectionnez le code qui donne deux résultats |type="()"} - SELECT name FROM bbc WHERE name = 'United Kingdom' - SELECT name FROM bbc WHERE name = 'United Kingdom' AND 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 WHERE name IS 'Scotland'

{Sélectionnez le résultat obtenu avec le code:

SELECT name FROM bbc WHERE region = 'South America' AND population > 40000000
Table-A
Afghanistan
Brazil
Colombia
Table-B
Brazil
Table-C
Brazil
Colombia
Table-D
BrazilSouth America
ColombiaSouth America
Table-E
Brazil182800000
Colombia45600000

|type="()"} - Table-A - Table-B + Table-C - Table-D - Table-E </quiz>