Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL HOMEWORK Homework #6 Subqueries Complete the following queries. a) Use subqueries to answer the following questions Which drivers begin trips at Olympia with an

SQL HOMEWORK

Homework #6 Subqueries

Complete the following queries.

a) Use subqueries to answer the following questions

Which drivers begin trips at Olympia with an Effective Date in January 2005?

Do any drivers use more than one bus on their run where the Bid Date is in September 2004?

Which drivers make trips that last longer than 45 minutes?

Which trips are operated by Phantoms and have an Effective Date in 2005?

b) Answer the same questions using inner- or natural joins (where clause is used for the join).

c) Display trips with an Effective Date in 2005 made by Operators with less than three years on the job.

Reference

image text in transcribed

Operators Runs Vehicles PK OperatorlD PK RunID PK VehiclelD 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

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

Students also viewed these Databases questions

Question

=+Will the humor help meet the objectives?

Answered: 1 week ago

Question

2. What is the business value of security and control?

Answered: 1 week ago