I have the following query:
SELECT carBrand, carYear, carModel
FROM Cars;
What I want is to get only different car names.
I wrote this, but it is not what I want:
SELECT DISTINCT carBrand, carYear, carModel
FROM Cars;
How can I solve this problem?
Try thi:
SELECT carBrand, carYear, carModel
FROM Cars
GROUP BY carBrand, carYear, carModel;