Difference between revisions of "JOIN Quiz 2"
From SQLZOO
| Line 25: | Line 25: | ||
- SELECT name, COUNT(movieid) FROM casting JOIN actor WHERE (actorid ON actor.id) AND name LIKE 'John %' GROUP BY name ORDER BY 2 DESC | - SELECT name, COUNT(movieid) FROM casting JOIN actor WHERE (actorid ON actor.id) AND name LIKE 'John %' GROUP BY name ORDER BY 2 DESC | ||
- SELECT name, COUNT(movieid) FROM casting JOIN actor WHERE name LIKE 'John %' GROUP BY name ORDER BY COUNT(movieid) DESC | - SELECT name, COUNT(movieid) FROM casting JOIN actor WHERE name LIKE 'John %' GROUP BY name ORDER BY COUNT(movieid) DESC | ||
| + | |||
| + | {Select the result that would be obtained from the following code: SELECT title FROM movie, casting, actor WHERE name='Paul Hogan' AND movieid=movie.id AND actorid=actor.id AND ord = 1 | ||
| + | |type="()"} | ||
| + | - Table-A | ||
| + | - Table-B | ||
| + | - Table-C | ||
| + | - Table-D | ||
| + | + Table-E | ||
{Select the statement that lists all the actors that starred in movies directed by Ridley Scott | {Select the statement that lists all the actors that starred in movies directed by Ridley Scott | ||
Revision as of 14:01, 7 August 2012
JOIN Quiz - part 2