RE: [HACKERS] select count(*) from hits group by count;
| От | Dmitry Samersoff | 
|---|---|
| Тема | RE: [HACKERS] select count(*) from hits group by count; | 
| Дата | |
| Msg-id | XFMail.20000129194004.dms@wplus.net обсуждение исходный текст  | 
		
| Ответ на | select count(*) from hits group by count; (Oleg Bartunov <oleg@sai.msu.su>) | 
| Список | pgsql-hackers | 
On 29-Jan-2000 Oleg Bartunov wrote: > Hi there, > and query: > discovery=> select count(*) from hits group by count; > ERROR: Aggregates not allowed in GROUP BY clause > > There's easy workaround : > discovery=> select count(*) as qq from hits group by count; > but I'm curious is this a valid query ? > Last snapshot also behave like 6.5.3 > > > Another question: > discovery=> select count(*) as qqq,* from hits group by last_access; > produces error: > ERROR: Illegal use of aggregates or non-group column in target list AFAIK, MS SQL, Sybase and Informix have the same restrictions, because using all fields in query with aggregates and grouping is meaningless. Order of fields in group by clause also significant. -- Dmitry Samersoff, dms@wplus.net, ICQ:3161705 http://devnull.wplus.net * There will come soft rains ...
В списке pgsql-hackers по дате отправления: