我有个问题其中关系是3部电影( mID,标题,年份,导演),评论家(rID,名字),评级(rID,mID,明星,ratingDate)SELECT DISTINCT M.TITLE FROM MOVIE AS M JOIN RATING AS R ON R.mID = M.mID WHERE R.rID NOT IN (SELECT Rating.rID FROM Rating JOIN Reviewer ON Reviewer.rID = Rating.rID WHE
我在一个MySQL数据库中工作。我想在id上将表2和表3连接到表1的结果。我希望保留表1的所有条目,并且在加入之后,调用id上的2和3的结果为NULL值。Table 1 has callidTable 3 has invoiceid and customerid
因此,在invoiceid上连接表2和3,并按customerid = xyz