Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Top-N in Materialized View

604365Dec 19 2008 — edited Dec 19 2008
Hello,

I have to create a materialized view for a top 10 query. "rownum" and "Rank()" doesn't work in a mv.

That's my query:
bq. SELECT * \\ FROM ( \\ SELECT RANK() OVER(order by sum(f.f_gebuehren) DESC) as Rang, sum(f.f_gebuehren), d.d_monat, d.d_jahr, a.a_name \\ FROM fakt f, datum d, anbieter a \\ WHERE f.d_datum=d.d_datum \\ AND f.a_id = a.a_id \\ GROUP BY d.d_monat, d.d_jahr, a.a_name) \\ WHERE Rang <= 10;
Are there any ideas of solving this problem?
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2009
Added on Dec 19 2008
9 comments
389 views