This content has been marked as final. Show 3 replies
I am new to PL/SQL Query, I just need to have AVG count on the query i have posted above. I am not asking the View or table for my query.
You can use something like this
with t as ( select to_char(COLLECTION_TIMESTAMP,'YY-MM-DD') day, count(distinct COLLECTION_TIMESTAMP) Counts_per_day ,METRIC_NAME from MGMT$ALERT_NOTIF_LOG where COLLECTION_TIMESTAMP > '01-JUN-2013 00:00:01' group by to_char(COLLECTION_TIMESTAMP,'YY-MM-DD') ,METRIC_NAME ) select day,avg(Counts_per_day) from t group by day