Hi, am stuck on some question from : http://sqlzoo.net/3.htm
can anyone please help me to get the answer of section 4a,b,c,d and e.

Lets see what you have tried.


SELECT COUNT(movie.id),movie.yr FROM movie
JOIN actor ON actor.id=movie.id
JOIN casting ON movie.id=casting.movieid
WHERE actor.name='John Travolta'


SELECT movie.title, actor.name FROM movie
JOIN casting ON movie.id=casting.movieid
JOIN actor ON actor.id=movie.id
WHERE movie.director='Julie Andrews' AND casting.ord=1

SELECT actor.name FROM actor
JOIN casting ON actor.id=casting.actorid
WHERE casting.ord>1


SELECT movie.title,casting.ord FROM movie
JOIN casting ON movie.id=casting.movieid
WHERE movie.yr=1978
ORDER BY casting.ord ASC


thank you in advance for correcting my mistakes.
i think that i have wrongly understood the concepts of JOIN despite my several trials, can you please help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.