Subject group by date from timestamp?
Author Matzen, John
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]