Hi,
I have two Select statements shown below. I want to join these both and should get the proper result of No of posts and No of Comments with respect to the particular user. Can anybody please help me on this
select
user1.userid,
CONCAT(user1.firstname,' ',user1.lastname) as UserName,
count(na.activity_master_id) NoOfPosts
from
user user1
left outer join network_activity na on na.created_by = user1.userid
where na.status = 'a'
and na.network_id = 10
and na.activity_master_id = 9
group by user1.userid
select
user1.userid,
CONCAT(user1.firstname,' ',user1.lastname) as UserName,
count(nc.comment_by) NoOfComments
from
user user1
left outer join network_comments nc on nc.comment_by = user1.userid
left outer join network_activity na on na.id = nc.activity_id
where na.network_id = 10
group by user1.userid
Thanks in Advance