I have a query like the one below but it doesn't work as expected.
select profile_id, header, blog_id, max(publish_date) from blog group by profile_id
header, blog_id contains data from the first row it meets, not the newest row as I am trying to select with MAX.
Any hints?