I have two columns, the sender user id and receiver user id message in the table I send to sender user ADID and receiver user Select where the current receiver sent a message to the present sender. I only select 10 rows each time 10 times, but occasionally this table sender appears more than once in UserID when I need that only the sender user ID will be unique, while the number of times the receiver userid , Can return as often as possible.
This sample data is
66622 61350 90166 79222 90176 79222 86727 80452 10888 47305 66560 79219 66622 80452 89548 14452 66622 69177 52081 79223 As you can see 66622 sender user Appears twice in How can I restrict it to appear only once? Thanks
I just ignore any duplicates that you have to do with each of your batch Will give at least 10 results, but I want to apply specificity through grouping (expensive) message to maximize expansion, is it correct?
If you still want to do this in SQL:
senderUserId, max (receiverUserId) to senderUserId
Comments
Post a Comment