In this setup, the query is grouped by quarter and the
Ratio_To_Report computes the quarterly sales to yearly
sales totals ratio (37000/183500 = 0.20163 for quarter
one, similarly for two and so on, as shown in
query output
). Sames as the
month/year ratio
computation, there is no PARTITION BY clause -
OVER(PARTITION BY )
resulting in Ratio_To_Report function computed for the
complete result set of the query. Next example explains
the use of PARTITION BY clause for a dataset consisting of
full and partial year
.
Oracle registered trademark of Oracle Corporation.