Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele The cheapest combination | Grouping
SQL Basics

book
The cheapest combination

Let's try to use acquired knowledge to solve the following problem!

Tehtävä

Swipe to start coding

From the audi_cars table extract all the combinations of fueltype + transmission. Round price to 2 decimals and order using it in ascending order.

Ratkaisu

SELECT fueltype, transmission, ROUND(AVG(price),2)
FROM audi_cars
GROUP BY fueltype, transmission
ORDER BY AVG(price)

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 5. Luku 4

toggle bottom row
Query ResultQuery Result
No query executed yet...
some-alt