Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Need help on a query

$
0
0
Hey,

I am stuck with a SQL statement. I have 2 tables:

user: user_id (PK), displayname
message: id (PK), sender_id (FK to user_id), receiver_id (FK to user_id), message

Im trying for like 3 hours to get this:

Get a list of the last messages from each user.

I was trying hard with MAX(message.id) but failed miserably :o

Viewing all articles
Browse latest Browse all 13329

Trending Articles