Customer(cid, cname, caddress, cphone, balance)
Movie(mid, title, genre, year)
Branch(bid, bname, baddress)
Copy(copyid, mid, bid)
Rental(cid, copyid, outdate, returndate, cost)
列出所有租用“终结者1”和“终结者2”而非“终结者3”的客户。
这是我的答案,但输出不对:
SELECT r.cid from (Rental r natural join Copy c), Movie m
WHERE c.mid=m.mid and m.title="Terminator 1" and m.title="Terminator2" and m.title<>"Terminator 3"