I want to select data from a table in MySQL where a specific field has the minimum value, I\'ve tried this:
SELECT * FROM pieces WHERE MIN(price)
Efficient way (with any number of records):
SELECT id, name, MIN(price) FROM (select * from table order by price) as t group by id