so suppose I do
SELECT * FROM table t GROUP BY t.id
Suppose there are multiple rows in the table with the same id, only one row of that id will ultimately come out…I suppose mysql will order the results that have the same id and the return the first one or something….my question is…how does mysql perform this ordering and is there a way that I can control its ordering so that for instance, it uses a certain field etc?
You can
GROUP BYseveral different columns to arrange the order for which the result is grouped.