I have an Oracle table which has a name,value,time columns.Basically the table is for logging purposes to store what are the changes made to a particular name,what was the p
I offer my quick fix. This query groups and counts in descending order (in the inner query). The Outer query simply allows you to define the number of rows to display (:pRows).
Select * from
(Select
group_field,
count(*) Cnt
From
record_source(s)
Where
Conditions
Order by
Count(*) Desc) x
Where
rownum < :pRows+1;