/ Published in: SQL

A few examples of the CUME_DIST function.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT CUME_DIST(300) WITHIN GROUP (ORDER BY fees_paid) AS cume_dist_test FROM student; SELECT CUME_DIST(300, 200) WITHIN GROUP (ORDER BY fees_paid, fees_required) AS cume_dist_test FROM student; SELECT first_name, last_name, fees_paid, CUME_DIST() OVER (ORDER BY fees_paid) AS cume_dist_test FROM student; SELECT first_name, last_name, fees_paid, CUME_DIST() OVER (PARTITION BY address_state ORDER BY fees_paid) AS cume_dist_test FROM student;
URL: http://www.databasestar.com/oracle-cume_dist
Comments
