SQL HOMEWORK HELP !

Given relationship diagram

Operators Runs Vehicles PK OperatorlD PK RunID PK VehicleID SeniorityNumber FirstName LastName Manufacturer Model Year PurchaseDate FK1 OperatorlD BidDate Schedule PK SchedulelD FK1 RunlD FK2 VehiclelD Trips PK TriplD FK1 SchedulelD StartLocation StartTime EndLocation EndTime EffectiveDate

Table given

Requirements

Complete the following queries. “Natural join” refers tofields compared in the WHERE

clause.

a. Display the Run ID and all fields from the trips table foreach trip using an inner-join.

b. Display the vehicle name used for each trip, and all fieldsfrom the trip table, using a natural join.

c. Display each Operator and the vehicles that he/she drivesusing an inner-join (operator name, manufacturer, model, vehicleid).

d. Display the count of trips for each January 2005 run using anatural join (test the Bid Date field in Runs).

e. Calculate the number of trips Vehicle #3 made in September2004’s schedule using an inner-join (you may need to refer toassignment #1 for the correct vehicle, depending

on identity values) (use the Effective Date in Trips).

f. List any routes that have more than one bus operating tripsgrouped by Effective Date.

g. Calculate the number of Operators who start at or arrive atLacey in January 2005 (use Effective Date in Trips).

h. Insert a new vehicle (CityCruiser, 35 foot, 1996); create alist of buses and trip details, including all buses.

i. Display the Operator name, vehicle model, start location, andstart time for all trips starting after 9:00 am in September2004.

Turn in this file with your SQL code and screen prints.

Operators Runs Vehicles PK OperatorlD PK RunID PK VehicleID SeniorityNumber FirstName LastName Manufacturer Model Year PurchaseDate FK1 OperatorlD BidDate Schedule PK SchedulelD FK1 RunlD FK2 VehiclelD Trips PK TriplD FK1 SchedulelD StartLocation StartTime EndLocation EndTime EffectiveDate Show transcribed image text Operators Runs Vehicles PK OperatorlD PK RunID PK VehicleID SeniorityNumber FirstName LastName Manufacturer Model Year PurchaseDate FK1 OperatorlD BidDate Schedule PK SchedulelD FK1 RunlD FK2 VehiclelD Trips PK TriplD FK1 SchedulelD StartLocation StartTime EndLocation EndTime EffectiveDate