working on rails app. message table looks this:
message table
recipient_id | engagement_id
my goal show recent message of engagement, same recipient_id current_user, grouped engagement. post seems going for
finding recent entry per reference (foreign key) in rails
having trouble getting syntax correct. here's have currently:
select message,max(time) maxtime message group engagement_id
thanks in advance
Comments
Post a Comment