MySQL Query - recent entries per group
问题 I'm trying to select the most recent entries per group in a table. Say I have a table "blog_posts" which has a column for "id" (all unique, auto incremented), "post_cat" which can be values 'category1' or 'category2' or 'category3', and a "publish_status" column which can be values 'online' or 'offline'. How can I select the most recent entries for each category? I have the following right now, but it almost feels like it's selecting randomly: select * FROM `blog_posts` WHERE (publish_status