Re: sql

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: sql
Дата
Msg-id 40D96BB0.7020301@archonet.com
обсуждение исходный текст
Ответ на sql  ("cristi" <cristi@dmhi.ct.ro>)
Список pgsql-sql
cristi wrote:
> 
> I mean:
> I want to select the records wich for co1,n1,l1,m1 value are the same and
> has the maxim value of the ore field
> adding to that value the value of the records which are not selected.

SELECT co,clo1,nl,l1,m1,SUM(ore) AS tot_ore
FROM xxx
WHERE <conditions here>
GROUP BY co,clo1,nl,l1,m1
ORDER BY co,clo1,nl,l1,m1;

--   Richard Huxton  Archonet Ltd


В списке pgsql-sql по дате отправления:

Предыдущее
От: sad
Дата:
Сообщение: feature request ?
Следующее
От: Clive Page
Дата:
Сообщение: Non-standard function names