437Midterm_Fall2006_T1_solution

437Midterm_Fall2006_T1_solution

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t FROM ship s GROUP BY s.type ORDER BY COUNT(s.type) DESC; (c) [5%] Provide a list of ALL ports and the ships that consider these ports their home ports. Show only the port name and ship name. Sort by port name. Your answer must appear like this: Port Name Ship Name ---------- --------------- Coquitlam Queen of Dunbar Coquitlam The Ripper Port Moody Vancouver Jolly Roger SELECT p.portName, s.shipName FROM ship s, port p WHERE p.portName = s.portName (+) ORDER BY p.portName ASC; (d) [5%] Provide a list of ships that arrived in their home ports in the month of August 2006. Show only the port name and ship name. Your answer must appear like this: Port Name Ship Name ---------- --------------- Coquitlam Queen of Dunbar Coquitlam The Ripper Vancouver Jolly Roger COMM 437 Mid-Term Exam (Fall 2006 Term 1) Page 3 of 7 SELECT portName, shipName FROM ship INTERSECT SELECT DISTINCT v.portName, v.shipName FROM visits v WHERE startDate BETWEEN ‘01/08/2006’ AND ‘31/08/2006’; COMM 437 Mid-Term Exam (Fall 2006 Term 1) Page 4 of 7 Question 2. Relational Database Design and Normalization...
View Full Document

This document was uploaded on 04/06/2014.

Ask a homework question - tutors are online