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 | + | <table style='float:left'><caption>Table-A</caption><tr><td>Andorra</td><td>234</td></tr></table> |
| − | <table | + | <table style='float:left'><caption>Table-B</caption><tr><td>Andorra</td><td>468</td></tr></table> |
| − | <table | + | <table style='float:left'><caption>Table-C</caption><tr><td>Andorra</td><td>936 </td></tr></table> |
| − | <table | + | <table style='float:left'><caption>Table-D</caption><tr><td>Andorra</td><td>4680</td></tr></table> |
| − | <table | + | <table style='float:left'><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-A | ||
| Line 96: | 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 | + | <table style='float:left'><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 | + | <table style='float:left'><caption>Table-B</caption><tr><td>Algeria</td><td>32900000</td></tr><tr><td>Angola</td><td>14500000</td></tr></table> |
| − | <table | + | <table style='float:left'><caption>Table-C</caption><tr><td>AlgeriaMiddle East</td><td>32900000</td></tr><tr><td>AngolaAfrica</td><td>14500000</td></tr></table> |
| − | <table | + | <table style='float:left'><caption>Table-D</caption><tr><td>AngolaAfrica</td><td> 14500000</td></tr></table> |
| − | <table | + | <table style='float:left'><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-A | ||
Revision as of 10:13, 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 | |
| ... | ||||