我有以下架构。
MovieInfo (mvID, title, rating, year, length, studio)
DirectorInfo(directorID, firstname, lastname)
DirectInfo(mvID*, directorID*)
GenreInfo(mvID*, genre)
我希望输出仅在一种类型中工作过的演员的详细信息列表,例如动作片。电影与类型是一对多的关系。
到目前为止我有这个,但我遇到了错误。
SELECT ActorInfo.ActorID, ActorInfo.firstname, ActorInfo.lastname
FROM ActorInfo, GenreInfo, CastInfo
WHERE CastInfo.mvID = GenreInfo.mvID
AND CastInfo.ActorID = ActorInfo.ActorID
AND Genreinfo.genre = 'ACtion'
MINUS
(SELECT ActorInfo.ActorID, ActorInfo.firstname, ActorInfo.lastname,
FROM ActorInfo, GenreInfo, CastInfo
WHERE CastInfo.mvID = GenreInfo.mvID
AND CastInfo.ActorID = ActorInfo.ActorID
AND Genreinfo.genre != 'Action')
GROUP BY ActorInfo.ActorID, ActorInfo.firstname, ActorInfo.lastname,