BBC QUIZ
From SQLZoo
| Language: Project:Language policy | English • 日本語 • 中文 |
|---|
| name | continent | 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 | |
| ... | ||||
Select the code which gives the name of countries beginning with U
SELECTname FROMworld WHEREname BEGINwithU
SELECTname FROMworld WHEREnameLIKE'%U'
SELECTname FROMworld WHEREnameLIKE'%u%'
SELECTname FROMworld WHEREnameLIKEU
SELECTname FROMworld WHEREnameLIKE'U%'
Select the code which shows just the population of United Kingdom?
SELECTpopulation FROM'United Kingdom'
SELECTname FROMworld WHEREpopulation='United Kingdom'
SELECTFROMworld WHEREpopulationIN'United Kingdom'
SELECTpopulation FROMworld WHEREname='United Kingdom'
SELECTpopulation FROMworld WHERE'United Kingdom'INname
Select the answer which shows the problem with this SQL code - the intended result should be the continent of France:
SELECTcontinent FROMworld WHERE'name'='France'
continent should be 'continent'
'name' should be name
'France' should be "France"
'France' should be France
= should be IN
Select the result that would be obtained from the following code:
SELECTname,population/10 FROMworld WHEREpopulation<10000
Andorra 6400
Nauru 990
Andorra 64000
Nauru 9900
Nauru 99
Nauru 990
Nauru 9900
Select the code which would reveal the name and population of countries in Europe and Asia
SELECTname FROMworld WHEREcontinentIN('Europe','Asia')
SELECTname,population FROMworld WHEREcontinentIN('Europe','Asia')
SELECTname,population FROMworld WHEREnameIN(EuropeAsia)
SELECTname,population FROMworld WHEREnameIS('Europe','Asia')
SELECTname,population FROMworld WHEREcontinent=('Europe','Asia')
Select the code which would give two rows
SELECTnameFROMworld WHEREname='Cuba'
SELECTnameFROMworld WHEREname='Cuba' ANDname='Togo'
SELECTnameFROMworld WHEREnameEITHER('Cuba','Togo')
SELECTnameFROMworld WHEREnameIN('Cuba','Togo')
SELECTnameFROMWHEREnameIS'Mali'
Select the result that would be obtained from this code:
SELECTnameFROMworld WHEREcontinent='South America' ANDpopulation>40000000
Afghanistan
Brazil
Colombia
Brazil
Brazil
Colombia
Brazil South America
Colombia South America
Brazil 182800000
Colombia 45600000
Retrieved from "https://sqlzoo.net/w/index.php?title=BBC_QUIZ&oldid=14195"