SELECT Quiz

From SQLZOO
Revision as of 14:07, 23 July 2012 by Connor (Talk | contribs)

Jump to: navigation, search

SELECT quiz <quiz shuffle=none display=simple> {Select the code which shows the countries with a population between 100000000 and 200000000 |type="()"} -A. SELECT name, population FROM bbc WHERE population BETWEEN (100000000, 200000000) || this is wrong -B. SELECT name, population FROM bbc WHERE population BETWEEN 100000000, 200000000 +C. SELECT name, population FROM bbc WHERE population BETWEEN 100000000 AND 200000000 -D. SELECT name, population FROM bbc WHERE area BETWEEN 100000000 AND 200000000 -E. SELECT population FROM bbc WHERE population BETWEEN 100000000 AND 200000000

{Select the code which shows the countries that end in A or L |type="()"} -A. SELECT name FROM bbc WHERE name LIKE '%a' AND name LIKE '%l' -B. SELECT name FROM bbc WHERE name LIKE 'a%' AND name LIKE 'l%' -C. SELECT name FROM bbc WHERE name LIKE '%a' OR 'l%' +D. SELECT name FROM bbc WHERE name LIKE '%a' OR name LIKE '%l' -E. SELECT name FROM bbc WHERE name LIKE 'a%' OR name LIKE 'l%'

{Pick the code which shows the sum population of scandinavia(Denmark, Finland, Sweden and Norway) |type="()"} -A. SELECT SUM(population) FROM bbc WHERE name IN ('Denmark', 'Finland','Sweden') +B. SELECT SUM(population) FROM bbc WHERE name IN ('Denmark', 'Norway', 'Finland','Sweden') -C. SELECT population FROM bbc WHERE name IN ('Denmark', 'Norway', 'Finland','Sweden') -D. SELECT SUM(population) FROM bbc WHERE name IN LIKE ('Denmark', 'Norway', 'Finland' and 'Sweden') -E. SELECT SUM(population) FROM bbc WHERE name IN LIKE ('Denmark', 'Norway', 'Finland','Sweden')

{Select the code that would show the countries with an area larger than 50000 and a population smaller than 10000000 |type="()"} +A. SELECT name, area, population FROM bbc WHERE area > 50000 AND population < 10000000 -B. SELECT name, area, population FROM bbc WHERE area < 50000 AND population < 10000000 -C. SELECT name, area, population FROM bbc WHERE area = 50000 AND population = 10000000 -D. SELECT name, area, population FROM bbc WHERE area > 50000 AND population > 10000000 -E. SELECT name, area, population FROM bbc WHERE area < 50000 AND population > 10000000

{Select the code that shows the population density of China, Australia, Nigeria and France |type="()"} -A. SELECT name, area/population FROM bbc WHERE name IN ('China', 'Nigeria', 'France', 'Australia') -B. SELECT name, area/population FROM bbc WHERE name LIKE ('China', 'Nigeria', 'France', 'Australia') +C. SELECT name, population/area FROM bbc WHERE name IN ('China', 'Nigeria', 'France', 'Australia') -D. SELECT name, population/area FROM bbc WHERE name LIKE ('China', 'Nigeria', 'France', 'Australia') -E. SELECT name, population FROM bbc WHERE name IN ('China', 'Nigeria', 'France', 'Australia') </quiz>