Use ONs instead of USINGs to avoid Wong's Wrath
parent
d1c569f6b0
commit
591978dd3c
|
@ -141,8 +141,8 @@ SELECT cruiseName, departurePort, shipName, TO_CHAR(price, '$99,999.99') FROM Cr
|
|||
|
||||
-- 3b
|
||||
SELECT DISTINCT Cruise.CompanyName, Cruise.cruiseName FROM Cruise
|
||||
JOIN Reservation USING (cruiseID)
|
||||
JOIN Customer USING (customerID)
|
||||
JOIN Reservation ON Cruise.cruiseID = Reservation.cruiseID
|
||||
JOIN Customer ON Reservation.customerID = Customer.customerID
|
||||
WHERE Customer.Age > 50 AND Cruise.departurePort = 'Miami'
|
||||
ORDER BY Cruise.CompanyName ASC;
|
||||
|
||||
|
|
Loading…
Reference in New Issue