sum but not grouped by?

Поиск
Список
Период
Сортировка
От Henry Ortega
Тема sum but not grouped by?
Дата
Msg-id 2bffcc33050805092862a01b93@mail.gmail.com
обсуждение исходный текст
Ответы Re: sum but not grouped by?  (Mischa Sandberg <mischa.sandberg@telus.net>)
Re: sum but not grouped by?  (Luca Rasconi Master <luca.rasconi@gmail.com>)
Список pgsql-sql
I have the ff data:

id      |     date         |      hours
AAA    07-01-2005           3
AAA    07-02-2005           4
BBB    07-01-2005           6
BBB    07-02-2005           2
BBB    07-03-2005           7

Would it be possible to get the ff:

id      |     date         |      hours   |   id_total
AAA    07-01-2005           3              7
AAA    07-02-2005           4              7
BBB    07-01-2005           6              15
BBB    07-02-2005           2              15
BBB    07-03-2005           7              15

So it's like SUM OF, but not Grouped By? Is this possible at all?
Thank you for any help.


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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Make C file for create type
Следующее
От: Mischa Sandberg
Дата:
Сообщение: Re: sum but not grouped by?