Subject | group by date from timestamp? |
---|---|
Author | Matzen, John |
Post date | 2004-06-14T18:42:29Z |
I'm trying to get a count of records added per day. The table as a
timestamp field.
I can do this:
Select extract( day from added ), count(*) from foo group by extract(
day from added );
But the following does not work:
Select cast( added as date ) , count(*) from foo group by cast( added as
date );
Unfortunately the extract isn't really what I need.
Any thoughts?
[Non-text portions of this message have been removed]
timestamp field.
I can do this:
Select extract( day from added ), count(*) from foo group by extract(
day from added );
But the following does not work:
Select cast( added as date ) , count(*) from foo group by cast( added as
date );
Unfortunately the extract isn't really what I need.
Any thoughts?
[Non-text portions of this message have been removed]