Reference no: EM132168449
Using the following tables, you will write a relational algebra expression for each question.
CAPTAINS(CaptainID, CaptainName, CaptainPhone, YearsExperience, CaptainSupervisorID)
CREW(CrewID, CrewName, CrewPhone, DateHired, Position)
BOATS(BoatID, BoatName, SeatingCapacity, HomeHarbor)
TRIPS(TripID, TripDate, TripTime, TripOrigination, TripDestination, TripBoatID, CaptainID)
ASSIGNED_CREW(CrewID, TripID, Payment)
The CaptainSupervisorID matches a CaptainID of another captain.
E. Write a query to output the name of all crew members and their average payment.
F. Write a query to output the name of all captains who have captained every boat.
G. Write a query to output the names of all captains who have captained a boat with a home harbor of Gloucester.
H. Write a query to output the sum of all payments made to crew members on trip 87.
I. Write a query to output the CrewID of all crew members who have never been assigned.
J. Write a query to print, for each tripID, the number of crew members assigned to that trip