Re: Syntax bug? Group by?
От | D'Arcy J.M. Cain |
---|---|
Тема | Re: Syntax bug? Group by? |
Дата | |
Msg-id | 20061017124721.96646085.darcy@druid.net обсуждение исходный текст |
Ответ на | Re: Syntax bug? Group by? (Stephen Frost <sfrost@snowman.net>) |
Список | pgsql-hackers |
On Tue, 17 Oct 2006 12:08:07 -0400 Stephen Frost <sfrost@snowman.net> wrote: > * Mark Woodward (pgsql@mohawksoft.com) wrote: > > If I am asking for a specific column value, should I, technically > > speaking, need to group by that column? > > Technically speaking, if you're asking for a specific tuple, should you > be allowed to request an aggregation? One column value doesn't necessarily mean one tuple unless it has a unique index on that column. SELECT COUNT(*) FROM table WHERE field = 'value'; That's perfectly reasonable. You don't need the GROUP BY clause. However, this doesn't sound like a hackers question. Next time, please ask on another list such as pgsql-sql or even pgsql-novice. You can review the mailing lists and their purpose at http://www.postgresql.org/community/lists/ -- D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
В списке pgsql-hackers по дате отправления: