Skip to content
Advertisement

Get highest ids in by an inner join and max id

I got two tables, conversations and messages, What I’d like to do is to make a inner join from conversations to messages.

Here is my query:

Now everything works as it should, but a last thing is that in the inner join where i use

I would like to get the highest ids only, like:

But that doesn’t work

EDIT: I tried once to use:

But i got an error saying: Invalid use of group function.

Advertisement

Answer

EDIT

This will work!

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement