I have a table like this:
MainUser | PartyUser -------------------- George | Tom Michael | Tim Michael | James Michael | Monica Jim | Nick Jim | Connie
And I need to get something like this:
MainUser | PartyUser1 | PartyUser2 | PartyUser3 | PartyUser4 ... ---------------------------------------------------------------- George | Tom | | | Michael | Tim | James | Monica | Jim | Nick | Connie | |
Can someone help to find a way doing this in sql?
I'm having a hard time figuring this out, so any help would be greatly appreciated.