I have a table called Vehicle_Location containing columns (or more):
ID NUMBER(10)
SEQUENCE_NUMBER NUMBER(10)
TIME DATE
and I'm trying to get the minimum / maximum / average number of entries per day for each identifier.
I still have
select id, to_char(time), count(*) as c
from vehicle_location
group by id, to_char(time), min having id = 16
which gives me:
ID TO_CHAR(TIME) COUNT(*)
---------------------- ------------- ----------------------
16 11-05-31 159
16 11-05-23 127
16 11-06-03 56
So, I would like to get the min / max / avg column of count (*). I use Oracle as my DBMS.
source
share