Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL Advanced SQL Cars ERD Tip: coun nes.continent-car makers.country: car makers id-model details maker; model details.model- e car details.id CARS.CAR MAKERS CARS.COUNTRIES MAKER vahar215) FALLNAME

image text in transcribed
image text in transcribed
SQL Advanced SQL Cars ERD Tip: coun nes.continent-car makers.country: car makers id-model details maker; model details.model- e car details.id CARS.CAR MAKERS CARS.COUNTRIES MAKER vahar215) FALLNAME varchar2025 COUNTRYNAME achar2020) FK MAKER number FK FK COUNTRY number are for CARS CAR DETAILS PK.FKO NAMES CYLINDERS uber PKID FKI MODEL varchara25) ACCEL YEAR Provide a list of car details for the cars that were made by car makers in Germany. Use nested subqueries to minimize the number of joins that you ill need. (Use a minimum of 2 nested queries). Display the out year and the model as one field called Model and display the mpe. cylinders, and horsepower as one field, each column separated by called Specs. Order by year. 1. 1. Provide a list of car details for the cars that were made by car makers in Germany. Use nested subqueries to minimize the number of joins that you will need. (Use a minimum of 2 nested queries). Display the out year and the model as one field called Model and display the mpg, cylinders, and horsepower as one field, each col- umn separated by-'called Specs. Order by year. 23 51 2351 4 33 376 19 75 20 22 17 27 22.06 19 69 2351 625 2351 3.82 14 rows returned 3. Provide a list of the cars that have null MPG. In the list, 1970 aud 24-4-90 1970 volkswage264113 1970 bmw display the model, description, MPG, and a count of all the cars that don't have a null MPG. 1971 opel 1971 vokswagen 27-460 1972 vokswagen 23-4-54 1972 volkswagen 22-4-76 1973 vokswagen 26-4-45 28-4-90 of Cars ford torino (sW) plymouth plymouth satelite (sw) BONUS-if the MPG is null, display X in its place +3 pts amc rebel sst (sw) ford mustang boss 302 2. Provide a list of models that have an average MPG for their cars that is less than the overall average for all cars. Display the average MGP for each model, the overall average for all models, and then the difference. Exclude the nulls from your calculations. Order by Model aab 900s

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

4. Support and enliven your speech with effective research

Answered: 1 week ago