Re: Fw: Count rows group by time intervals

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Loredana Curugiu" <loredana(dot)curugiu(at)gmail(dot)com>
Cc: "Oliveiros Cristina" <oliveiros(dot)cristina(at)gmail(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Fw: Count rows group by time intervals
Date: 2007-05-09 15:28:18
Message-ID: 27240.1178724498@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Loredana Curugiu" <loredana(dot)curugiu(at)gmail(dot)com> writes:
>> 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.

If you subtract two *date* values you get an integer. If you subtract
two *timestamp* values you get an interval.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Jim Nasby 2007-05-09 23:38:30 Re: how to view the content of schema pg_catalog?
Previous Message Oliveiros Cristina 2007-05-09 15:14:17 Re: Fw: Count rows group by time intervals