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

book
The cheapest combination

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

Oppgave

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.

Løsning

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

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 5. Kapittel 4

Query ResultQuery Result
No query executed yet...

Spør AI

expand
ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

We use cookies to make your experience better!
some-alt