I’m trying to group a column in my MYSQL table called “set” and I’m trying to retrieve the lowest page_id of that set.
SELECT * FROM pages WHERE project_id ='$project_id' GROUP BY `set` ORDER BY page_id ASC
How would I go about doing this properly?
Use the
MIN()aggregate function: