sql query [message #20330] |
Tue, 14 May 2002 02:27 |
gower
Messages: 1 Registered: May 2002
|
Junior Member |
|
|
I have 1 table which have a date field-->dd-mon-yy hh24:mi:ss
i want a matrix report(or atleast tabular) which will give me
the count of recs on a date on a given time interval.
the time interval is stored in a diff table whcih will vary from 15,30,45,secs(any value).
the report should be as follows
Dates Time(15 secs) 9:30-9:45 9:45-10 10-10:15 10:15-10:30
-----
1/jan 4 3 3 10
2/jan 2 5 3 12
3/jan
4/jan 2 3 1 1
4 are the no of recs present on 1/jan for 9:30-9:45
|
|
|
Re: sql query [message #20331 is a reply to message #20330] |
Tue, 14 May 2002 02:54 |
vivek
Messages: 59 Registered: October 2001
|
Member |
|
|
This can be done using the decode, sum and count functions. Th edecode is used to pick the data u want. Count and sum then add up the occurences of this data. This is one way of doing it. Hope it helps.
|
|
|