Re: [GENERAL] Help me with this multi-table query

2010-03-24 Thread Nilesh Govindarajan
On 03/24/2010 01:14 PM, Dean Rasheed wrote: On 24 March 2010 05:17, Nilesh Govindarajan wrote: On 03/24/2010 12:45 AM, Dean Rasheed wrote: On 23 March 2010 11:07, Nilesh Govindarajanwrote: Hi, I want to find out the userid, nodecount and comment count of the userid. I'm going wrong so

Re: [GENERAL] Help me with this multi-table query

2010-03-24 Thread Dean Rasheed
On 24 March 2010 05:17, Nilesh Govindarajan wrote: > On 03/24/2010 12:45 AM, Dean Rasheed wrote: >> >> On 23 March 2010 11:07, Nilesh Govindarajan  wrote: >>> >>> Hi, >>> >>> I want to find out the userid, nodecount and comment count of the userid. >>> >>> I'm going wrong somewhere. >>> >>> Check

Re: [GENERAL] Help me with this multi-table query

2010-03-23 Thread Nilesh Govindarajan
On 03/24/2010 12:45 AM, Dean Rasheed wrote: On 23 March 2010 11:07, Nilesh Govindarajan wrote: Hi, I want to find out the userid, nodecount and comment count of the userid. I'm going wrong somewhere. Check my SQL Code- select u.uid, count(n.nid) nc , count(c.cid) cc from users u left join n

Re: [GENERAL] Help me with this multi-table query

2010-03-23 Thread Dean Rasheed
On 23 March 2010 11:07, Nilesh Govindarajan wrote: > Hi, > > I want to find out the userid, nodecount and comment count of the userid. > > I'm going wrong somewhere. > > Check my SQL Code- > > select u.uid, count(n.nid) nc , count(c.cid) cc from users u left join node > n on ( n.uid = u.uid ) left

[GENERAL] Help me with this multi-table query

2010-03-23 Thread Nilesh Govindarajan
Hi, I want to find out the userid, nodecount and comment count of the userid. I'm going wrong somewhere. Check my SQL Code- select u.uid, count(n.nid) nc , count(c.cid) cc from users u left join node n on ( n.uid = u.uid ) left join comments c on ( c.uid = u.uid ) group by u.uid having u.uid