[HACKERS] regd count(count(*)) in group by

2002-07-26 Thread Yuva Chandolu
Hi, We have a query "select count(count(*)) from test group by trunc(test_date)". This works fine with Oracle but when moving to postgres I changed it to "select count(count(*)) from test group by date_trunc('day', test_date)" but I get the following error ERROR: Aggregate function calls may no

Re: [HACKERS] regd count(count(*)) in group by

2002-07-26 Thread Rod Taylor
Try this: SELECT count(*) FROM ( SELECT count(*) FROM test GROUP BY date_trunc('day', test_date) ) as qry; On Fri, 2002-07-26 at 16:03, Yuva Chandolu wrote: > Hi, > > We have a query "select count(count(*)) from test group by > trunc(test_date)". This works fi