Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL HELP ! Homework #5 Joins Complete the following queries. Natural join refers to fields compared in the WHERE clause. a. Display the Run ID

SQL HELP !

Homework #5 Joins

Complete the following queries. "Natural join" refers to fields compared in the WHERE clause.

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

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

c. Display each Operator and the vehicles that he/she drives using an inner-join (operator name, manufacturer, model, vehicle id).

d. Display the count of trips for each January 2005 run using a natural join (test the BidDate field in Runs).

e. Calculate the number of trips Vehicle #3 made in September 2004's schedule using an inner-join (you may need to refer to assignment #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 trips grouped by Effective Date.

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

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

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

Preference

image text in transcribed

Operators Vehicles RLTES PK OperatorlD PK VehiclelD PK RunlD SeniorityNumber FirstName Manufacturer Model Year FK1 OperatorlD BidDate PK SchedulelD FK1 RunID FK2 VehiceID Trips FK1 SchedulelD StartTime

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

What are the challenges associated with tunneling in urban areas?

Answered: 1 week ago

Question

What are the main differences between rigid and flexible pavements?

Answered: 1 week ago

Question

What is the purpose of a retaining wall, and how is it designed?

Answered: 1 week ago

Question

How do you determine the load-bearing capacity of a soil?

Answered: 1 week ago

Question

what is Edward Lemieux effect / Anomeric effect ?

Answered: 1 week ago

Question

List the different categories of international employees. page 642

Answered: 1 week ago

Question

Explain the legal environments impact on labor relations. page 590

Answered: 1 week ago