Re: Fw: Count rows group by time intervals

Поиск
Список
Период
Сортировка
От Loredana Curugiu
Тема Re: Fw: Count rows group by time intervals
Дата
Msg-id 1c23c8e70705090801u715e5369i34b9bf49d0d23184@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fw: Count rows group by time intervals  ("Oliveiros Cristina" <oliveiros.cristina@gmail.com>)
Ответы Re: Fw: Count rows group by time intervals  ("Loredana Curugiu" <loredana.curugiu@gmail.com>)
Re: Fw: Count rows group by time intervals  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice

Funny thing.
In mine, it works...
On mine, If I subtract one date  from the other I get the number of days in between...which is another integer, I guess. and '%'  is the modular operator. Doesnt it work like this on yours?

 
If I substract one date from the other I get an interval.

Which version are you using?

I am using 7.4.12 version of postgres.

try

SELECT (date - '2007-01-01') % 2
FROM table

to see if you get zeroes and ones . 

It's not working. I've got the same error.


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

Предыдущее
От: "Oliveiros Cristina"
Дата:
Сообщение: Re: Fw: Count rows group by time intervals
Следующее
От: "Loredana Curugiu"
Дата:
Сообщение: Re: Fw: Count rows group by time intervals