|Subject||Re: SQL: Number of entries per day|
> select f_dayofmonth(ts), count(*) entries from table1 group byThanks.
> f_dayofmonth(ts) having entries>0
Where is the f_dayofmonth function located (or have you just made
that up as an example?)
> not sure if the group by will work on functionacross
> but you even if it does - how do you want the days to be separated
> months and years? you surely don't want all 1st's of the month to beI was thinking of returning a date and the number of entries on that
> totalled together?message have been removed]
day, i.e casting the timestamp using:
CAST(TIME_STAMP as DATE)
I've just tried:
select CAST(ts as date), count(*) as entries
group by CAST(ts as date)
having entries > 0
but it complains about the group by entry - 'Unknown toekn CAST'