Re: Count rows by day interval - Mailing list pgsql-sql

From chester c young
Subject Re: Count rows by day interval
Date
Msg-id 248641.9937.qm@web54314.mail.yahoo.com
Whole thread Raw
In response to Count rows by day interval  ("Loredana Curugiu" <loredana.curugiu@gmail.com>)
List pgsql-sql
> ...

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 


pgsql-sql by date:

Previous
From: ivan marchesini
Date:
Subject: insert a sequence
Next
From: Ireneusz Pluta
Date:
Subject: Re: insert a sequence