groupwise maximum - how to get column of latest row mysql -


the query below fine me except content in column message_content of first row in table al_messages. how can content of latest row?

select a.conversation_id,         a.creator_id,         c.screen_name       creator_screen_name,         c.first_name        creator_first_name,         c.last_name         creator_last_name,         count(d.message_id) messages_count,         message_content    al_conversations         inner join al_subjects b                 on a.subject_id = b.subject_id         inner join al_members c                 on a.creator_id = c.member_id         inner join al_messages d                 on a.conversation_id = d.conversation_id   a.subject_id = 301         , b.creator_id = 17  group  a.conversation_id  

the query result:

enter image description here


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -