Skip to content
Advertisement

Duplicated inner join results

With postgres I’m trying to get a single user and all their posts, but when I inner join the Users and Posts tables I receive this:

QUERY:

I’m also trying to do the same thing but as a json

QUERY:

I know why but I don’t know how to avoid it, can someone help me to get something like this:

Advertisement

Answer

By doing this I resolve the issue:

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