ID carname carmodel
1 Ferrari 1990
2 Porsche 1991
3 Jaguar 1992
Here I have two simple tables, where the carID in table1 is the ID in the second table.
Now I want to return the minimum cost from table 1 for ALL cars at once.
Jaguar will not be in the result, since there is no price on it, it is so simple, yet... Jesus!
SELECT t1.price, t2.car FROM Price as t1
INNER JOIN Car as t2 ON t1.carID = t2.ID
( t1.price = (SELECT min(t3.price) FROM Price as t3 ))
GROUP BY t1.price, t2.car;
Returns only the lowest cost of all cars:
I am stuck!
Any tips and/or suggestions are more than welcome!
Edit: "Your" WYSIWYG editor for text bugs a bit if I put in colors? It uses :[COLOR="rgb(65, 105, 225)"], which fails... at least here, Flock browser. I put in "COLOR=RED" instead!
Thanks, I managed to do it myself though. My bad was I grouped by several columns, which resulted in too many prices for a car, too many hours in a row in front of the computer does magical things to your thinking!