Answered step by step
Verified Expert Solution
Question
1 Approved Answer
just need help with some SQL homework here is the SQL tables: Find the registration numbers of all trucks. The results should be displayed in
just need help with some SQL homework
here is the SQL tables:
- Find the registration numbers of all trucks. The results should be displayed in the ascending order of the statuses and for all trucks that have the same status, the results should be displayed in the descending order of registration numbers.
- Find the total number of distinct names of cities being the departure locations for at least one trip. A city is a departure location when it is a departure location of the first leg of a trip.
- Find the total number of trips performed by each driver. List the driving licence numbers associated with the total number of trips. Ignore the drivers who performed no trips so far.
- Find the total number of times each truck has been used for the trips. List the truck registration numbers associated with the total number of trips. List only the trucks used more than 5 times.
- Find the trip numbers, driving licence numbers of the drivers who performed the trips and the registration numbers of the trucks used for the trips done in the first 30 days after 1 February 2016.
- Find the total number of trips that started or finished or passed through a city that has a letter y in its name.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started