This gives me 10 rows and then groups them...
SELECT FILG_DT, COUNT(FILG_DT)
WHERE ROWNUM <= 10 AND FILG_DT IS NOT NULL
GROUP BY FILG_DT
ORDER BY FILG_DT DESC;
How do I get 10 groups, regardless of rows?
What I am hoping to avoide is the select * from (select filg_dt from doc group by filg_dt) a rownum <= 10, because it will call 180 million records, before I just get my results of the top 10 groups.