| От | Weimao Ke |
|---|---|
| Тема | Re: pgsql aggregate: conditional max |
| Дата | |
| Msg-id | 44145265.6030100@indiana.edu обсуждение исходный текст |
| Ответ на | Re: pgsql aggregate: conditional max (Michael Fuhr <mike@fuhr.org>) |
| Список | pgsql-sql |
Michael Fuhr wrote: >On Sun, Mar 12, 2006 at 12:34:57AM -0500, Jeffrey Melloy wrote: > > >>Should be able to do this with a standard max() aggregate. >> >>select aid, cat, max(weight) >>from table >>group by aid, cat; >> >> > >That query returns the maximum weight for each (aid, cat) pair. >Against the example data it returns the entire table, not the >(aid, cat) pair with the max weight for a given aid. > > > Michael is right. This query does not solve the problem... -- All best, Weimao Weimao Ke Indiana University Bloomington School of Library and Information Science http://ella.slis.indiana.edu/~wke
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера