JOIN Quiz

From SQLZOO
Revision as of 13:32, 1 August 2012 by Connor (Talk | contribs)

Jump to: navigation, search

JOIN quiz <quiz shuffle=none display=simple> {SELECT the code which shows the players and their teams who have scored goals against Poland before. |type="()"} - SELECT country.name, color FROM ttms JOIN country ON (ttms.country=country.id) WHERE color = 'gold' - SELECT who, country.name, color FROM ttms JOIN country (ttms.country=country.id) WHERE color = 'gold' + SELECT who, country.name, color FROM ttms JOIN country ON (ttms.country=country.id) WHERE color = 'gold' - SELECT who, country.name, color FROM ttms JOIN country ON (ttms.country=country.id) WHERE color = 'silver' - SELECT who, country.name, color FROM ttms JOIN country WITH (ttms.country=country.id) WHERE color = 'gold'

{Which of the following shows the chinese woman's singles winners in the Seoul and Barcelona games? |type="()"} - SELECT city FROM ttws JOIN games ON (ttws.games=games.yr) WHERE city IN ('Barcelona', 'Seoul') AND ttws.country = 'CHN' - SELECT who, city FROM ttws JOIN games IN (ttws.games=games.yr) WHERE city IN ('Barcelona', 'Seoul') AND ttws.country = 'CHN' - SELECT who, city FROM ttws JOIN games ON (ttws.games=games.yr) WHERE city IN ('Barcelona', 'Atlanta') AND ttws.country = 'CHN' + SELECT who, city FROM ttws JOIN games ON (ttws.games=games.yr) WHERE city IN ('Barcelona', 'Seoul') AND ttws.country = 'CHN' - SELECT who, city FROM ttws JOIN games ON (ttws.games=games.yr) WHERE city IN ('Beijing', 'Seoul') AND ttws.country = 'CHN'


{Which of these shows the korean women's singles winners in order of medal achieved(Ascending order)? |type="()"} - SELECT ttws.country, city, color FROM ttws JOIN games ON (ttws.games=games.yr) WHERE ttws.country = 'CHN' ORDER BY color ASC + SELECT who, ttws.country, city, color FROM ttws JOIN games ON (ttws.games=games.yr) WHERE ttws.country = 'CHN' ORDER BY color ASC - SELECT who, ttws.country, city, color FROM ttws JOIN games ON (ttws.games=games.yr) WHERE ttws.country = 'CHN' ORDER BY country ASC - SELECT who, ttws.country, city, color FROM ttws JOIN games ON (ttws.games=games.yr) WHERE ttws.country = 'CHN' ORDER BY color DESC - SELECT who, ttws.country, city, color FROM ttws JOIN games ON (ttws.games=games.yr) WHERE who = 'CHN' ORDER BY color ASC

{Which of these shows the gold medalists for the men's doubles from 1992 to 2000? |type="()"} + SELECT name, color, games FROM ttmd JOIN team ON team=team.id WHERE color='gold' AND games BETWEEN 1992 and 2000 - SELECT name, color, games FROM ttmd JOIN team ON team=team.id WHERE color='gold' AND games BETWEEN 2092 and 3000 - SELECT name, color, games FROM ttmd JOIN team ON team=team.id WHERE color='gold' AND WHERE games BETWEEN 1992 and 2000 - SELECT name, color, games FROM ttmd JOIN team ON team=team.id WHERE color='silver' AND games BETWEEN 1992 and 2000 - SELECT name, color, games FROM ttmd JOIN team WITH team=team.id WHERE color='gold' AND games BETWEEN 1992 and 2000

{Which of the following shows the men's doubles chinese gold medalists who have names beginning with w? |type="()"} - SELECT FROM ttmd JOIN team ON team=team.id WHERE country = 'CHN' AND color = 'gold' AND name LIKE 'W%' - SELECT name, color, country FROM ttmd JOIN team ON team=team.id WHERE country = 'CHN' AND color = 'gold' AND name IN 'W%' - SELECT name, color, country FROM ttmd JOIN team ON team=team.id WHERE country = 'CHN' AND color = 'gold' AND name LIKE '%W' + SELECT name, color, country FROM ttmd JOIN team ON team=team.id WHERE country = 'CHN' AND color = 'gold' AND name LIKE 'W%' - SELECT name, color, country FROM ttmd JOIN team ON team=team.id WHERE country = 'CHN' AND color = 'silver' AND name LIKE 'W%' </quiz>