Re: Tabulate data incrementally

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Omar Eljumaily <omar2(at)omnicode(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Tabulate data incrementally
Date: 2007-03-08 15:20:04
Message-ID: 7428.1173367204@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Omar Eljumaily <omar2(at)omnicode(dot)com> writes:
> I want to tabulate time data on a weekly basis, but my data is entered
> on a daily basis.

Something involving GROUP BY date_trunc('week', _date) might work for
you, if your definition of week boundaries matches date_trunc's.
If not, you could probably make a custom function that breaks at the
boundaries you want.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Reuven M. Lerner 2007-03-08 15:43:47 Re: Database slowness -- my design, hardware, or both?
Previous Message Csaba Nagy 2007-03-08 15:16:25 Re: OT: Canadian Tax Database