I have these tables and I are trying to calulate how many sold seats there is for each movie. I still can't get it to work and I only get the total for sold seats for all the movies.
Movie:
moveID
mName
Prog:
progID
moveID
showID
Show:
showID
show start
show stop
soldSeats
progID
This is one of the codes have been working on:
SELECT mName, SUM(soldSeats)
FROM movie, show
WHERE movie.movieID = prog.movieID
AND prog.showID = show.showID
GROUP BY mName
Can anybody help?