For the questions below, consider the following schema
BusRoutes (RNo, from, to, distance, price)
Bus (BID, BusName, TravelRange)
Allowed (EID, BID)
Employees (EID, EName, Salary)
BusRoutes table gives the information for bus routes (RNo), where the bus leaves from, where it is going to, the distance between the two points, and the price for this route (end to end).
Employees table contains information on Bus Drivers, and other employees. Every driver is allowed to drive for some Bus (or he/she won't be a driver ;), and only drivers can drive a bus (not other employees).
Write the following queries in SQL:
a. Find the Employee ID and the maximum travel range of the Bus for each Driver who is certified for that bus and at least two other Buses.
b. Find the drivers (i.e. their names) whose salary is less than the price of the cheapest route from Boston to LA.
Recently Asked Questions
- Should our present gets to dictate what is morally correct -- and if it does then why do we get to make that judgement? And why do we make different
- I answer like this but it was not right can any one explains how you do it
- COMM280 assignment Think about your own interpersonal relationships and identify a scenario that you believe is a common interpersonal communication ethics