Subject RE: [ib-support] Re: SQL: Number of entries per day
Author Alan McDonald
the freeudflib has these functions
-----Original Message-----
From: tickerboo2002 [mailto:support@...]
Sent: Monday, 16 September 2002 22:38
To: ib-support@yahoogroups.com
Subject: [ib-support] Re: SQL: Number of entries per day


> select f_dayofmonth(ts), count(*) entries from table1 group by
> f_dayofmonth(ts) having entries>0

Thanks.

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 function
> but you even if it does - how do you want the days to be separated
across
> months and years? you surely don't want all 1st's of the month to be
> totalled together?message have been removed]

I was thinking of returning a date and the number of entries on that
day, i.e casting the timestamp using:

CAST(TIME_STAMP as DATE)

I've just tried:

select CAST(ts as date), count(*) as entries
from run_log
group by CAST(ts as date)
having entries > 0

but it complains about the group by entry - 'Unknown toekn CAST'


Yahoo! Groups Sponsor
ADVERTISEMENT




To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]