From: chester c young <chestercyoung@yahoo.com>
To: Loredana Curugiu <loredana.curugiu@gmail.com>
Cc: sql pgsql <pgsql-sql@postgresql.org>
Subject: Re: Count rows by day interval
Date: Thu, 10 May 2007 11:34:22 -0700 (PDT)
Message-ID: <248641.9937.qm@web54314.mail.yahoo.com> (raw)
In-Reply-To: <1c23c8e70705100101y63bd0c21g466ca0ee830cdec8@mail.gmail.com>
> ...
instead of date_trunc('day',sent_messages.date)
why don't you have a function that takes four three arguments:
- beginning date of query
- interval, ie, reminder_services.activity_days_min
- timestamp, ie, sent_messages.date
have it return the minimum date for that interval
as I think I understand your problem, that should work
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: chestercyoung@yahoo.com, loredana.curugiu@gmail.com
Subject: Re: Count rows by day interval
In-Reply-To: <248641.9937.qm@web54314.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox