From 5863ae7b2a4aeacb731aa8d90144912a8c5832f5 Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Tue, 27 Aug 2019 02:12:49 -0400 Subject: [PATCH] Add solution for part 3c --- Cruise.sql | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Cruise.sql b/Cruise.sql index 5546beb..0e70f4f 100644 --- a/Cruise.sql +++ b/Cruise.sql @@ -144,4 +144,11 @@ SELECT DISTINCT Cruise.CompanyName, Cruise.cruiseName FROM Cruise JOIN Reservation USING (cruiseID) JOIN Customer USING (customerID) WHERE Customer.Age > 50 AND Cruise.departurePort = 'Miami' - ORDER BY Cruise.CompanyName ASC; \ No newline at end of file + ORDER BY Cruise.CompanyName ASC; + +-- 3c +SELECT companyName || Company.stockSymbol AS CruiseCompany, Cruise.cruiseName, Reservation.travelDate FROM Reservation + NATURAL JOIN Cruise + NATURAL JOIN Company + WHERE Cruise.Days >= 10 AND Reservation.travelDate >= '1-JAN-2019' + ORDER BY Cruise.cruiseName ASC, Reservation.travelDate ASC; \ No newline at end of file