Difference between revisions of "SELECT Quiz"
From SQLZOO
| Line 67: | Line 67: | ||
{Pick the result you would obtain from this code: SELECT name, area * 2 FROM bbc WHERE population = 64000 | {Pick the result you would obtain from this code: SELECT name, area * 2 FROM bbc WHERE population = 64000 | ||
| + | <table><caption>Table-A</caption><tr><td>Andorra</td><td>234</td></tr></table> | ||
| + | <table><caption>Table-B</caption><tr><td>Andorra</td><td>468</td></tr></table> | ||
| + | <table><caption>Table-C</caption><tr><td>Andorra</td><td>936 </td></tr></table> | ||
| + | <table><caption>Table-D</caption><tr><td>Andorra</td><td>4680</td></tr><tr><td>Angola</td><td>Africa</td></tr></table> | ||
| + | <table><caption>Table-E</caption><tr><td>Andorra</td><td>936</td></tr><tr><td>Albania</td><td>57456</td></tr></table> | ||
|type="()"} | |type="()"} | ||
| − | - | + | - Table-A |
| − | - | + | - Table-B |
| − | + | + | + Table-C |
| − | - | + | - Table-D |
| − | - | + | - Table-E |
{Select the code that would show the countries with an area larger than 50000 and a population smaller than 10000000 | {Select the code that would show the countries with an area larger than 50000 and a population smaller than 10000000 | ||
| Line 91: | Line 96: | ||
{Pick the result that would be obtained from this code: SELECT CONCAT(name,region), population FROM bbc WHERE region IN ('Africa','Middle East') AND name LIKE 'A%' | {Pick the result that would be obtained from this code: SELECT CONCAT(name,region), population FROM bbc WHERE region IN ('Africa','Middle East') AND name LIKE 'A%' | ||
| − | <table><caption>E</caption><tr><td>Algeria</td><td>Middle East</td></tr><tr><td>Angola</td><td>Africa</td></tr></table> | + | <table><caption>Table-A</caption><tr><td>(Algeria, Middle East)</td><td>32900000</td></tr><tr><td>(Angola, Africa)</td><td>14500000</td></tr></table> |
| + | <table><caption>Table-B</caption><tr><td>Algeria</td><td>32900000</td></tr><tr><td>Angola</td><td>14500000</td></tr></table> | ||
| + | <table><caption>Table-C</caption><tr><td>AlgeriaMiddle East</td><td>32900000</td></tr><tr><td>AngolaAfrica</td><td>14500000</td></tr></table> | ||
| + | <table><caption>Table-D</caption><tr><td>AngolaAfrica</td><td> 14500000</td></tr></table> | ||
| + | <table><caption>Table-E</caption><tr><td>Algeria</td><td>Middle East</td></tr><tr><td>Angola</td><td>Africa</td></tr></table> | ||
|type="()"} | |type="()"} | ||
| − | - | + | - Table-A |
| − | - | + | - Table-B |
| − | + | + | + Table-C |
| − | - | + | - Table-D |
| − | - E | + | - Table-E |
</quiz> | </quiz> | ||
[[Category:Quizzes]] | [[Category:Quizzes]] | ||
| − | |||
Revision as of 09:42, 7 August 2012
SELECT quiz
| 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 | |
| ... | ||||