Re: SUM all timeelapse WHERE timetype = 'Break' but only the rows that are after(below) timetype = 'Start'

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: SUM all timeelapse WHERE timetype = 'Break' but only the rows that are after(below) timetype = 'Start'
Дата
Msg-id CAKFQuwYeui+hCsyK2H_QV-WUbDDnQRaVmCXq8TaXu-4YTaPaTw@mail.gmail.com
обсуждение исходный текст
Ответ на SUM all timeelapse WHERE timetype = 'Break' but only the rows that are after(below) timetype = 'Start'  (litu16 <litumelendez@gmail.com>)
Список pgsql-admin
On Sun, Jun 28, 2015 at 1:56 AM, litu16 <litumelendez@gmail.com> wrote:

Pls I would like to know how to SUM THEM UP, not just SELECT THEM, hope some
good PostgreSQL fellow programmer could give me a hand with it.



Also see "GROUP BY"

Instead of showing a picture of a table you might get more help if you make into into a VALUES-based CTE and incorporate it directly into an example query.

WITH data AS ( VALUES (...),(...),(...) )
SELECT ...
FROM data
...

David J.
 

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

Предыдущее
От: litu16
Дата:
Сообщение: SUM all timeelapse WHERE timetype = 'Break' but only the rows that are after(below) timetype = 'Start'
Следующее
От: xujian
Дата:
Сообщение: Re: Postgresql gss user map doesn't work