Returning the last row of each
GROUP BY
in MySQL with WHERE
clause:"SELECT *
FROM foo
WHERE id IN (
SELECT Max(id)
FROM foo
WHERE value='XYZ'
GROUP BY u_id
)
LIMIT 0,30"
Comments
Post a Comment