Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Challenge: Relation between engine size and fuel consumption | Practicing
SQL Basics
course content

Kursinnehåll

SQL Basics

SQL Basics

1. Selecting
2. Filtering
3. Aggregating
4. Sorting
5. Grouping
6. Practicing

book
Challenge: Relation between engine size and fuel consumption

Uppgift

Swipe to start coding

From the audi_cars table calculate the average fuel consumption (mpg column) for each engine size (enginesize). Order results in descending order by the average value of mpg. Expected output: enginesize | average mpg.

Lösning

The result may seem strange, but don't forget that the mpg column refers to miles per gallon. The greater this value, the less fuel car consumes.

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 6. Kapitel 4
toggle bottom row

book
Challenge: Relation between engine size and fuel consumption

Uppgift

Swipe to start coding

From the audi_cars table calculate the average fuel consumption (mpg column) for each engine size (enginesize). Order results in descending order by the average value of mpg. Expected output: enginesize | average mpg.

Lösning

The result may seem strange, but don't forget that the mpg column refers to miles per gallon. The greater this value, the less fuel car consumes.

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 6. Kapitel 4
Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Vi beklagar att något gick fel. Vad hände?
some-alt