I have a table containing user comments, and I want to get the latest comment made by each user.
The request below should give an idea of ββwhat I'm trying to do.
select comment, comment_id, userId FROM comments_table WHERE comment_id in ( SELECT MAX(comment_id) FROM comments_table where userId in (2001, 2002, 2010) GROUP BY userId )
It works on the request, but takes too much time, especially if there are many userIds.
I need a faster query expression that does the same thing.
user1502826
source share