I have a table User consits of User details, Network_Network has the community information, Network_Subscribed_Networks has the User list who are subscribed to the Network.

Now i want to display the list of Users who have subscribed and is the owner of the network where Network_id=10;

The below query gives me only the owner name for nn.id=10; where as i want owner name and another users list who belong to nn.id=10.

Hope i am clear with the question. Can anybody please help me.

select user1.userid
from user user1
inner join (network_subscribed_networks nsn left outer join network_network nn on nsn.user_id = nn.created_by)
on user1.userid = nn.created_by
where nn.id = 10
group by nn.created_by