CREATE TABLE demo (
submit_date DATE NOT NULL,
num_votes NUMBER NOT NULL);
INSERT INTO demo VALUES (TRUNC(SYSDATE)-4, 100);
INSERT INTO demo VALUES (TRUNC(SYSDATE)-3, 150);
INSERT INTO demo VALUES (TRUNC(SYSDATE)-2, 75);
INSERT INTO demo VALUES (TRUNC(SYSDATE)-3, 25);
INSERT INTO demo VALUES (TRUNC(SYSDATE)-1, 50);
COMMIT;
SELECT * FROM demo;
SELECT submit_date, num_votes, SUM(num_votes)
OVER(ORDER BY submit_date ROWS UNBOUNDED PRECEDING) TOT_VOTE
FROM demo
ORDER BY submit_date;
Halim, a Georgia Tech graduate Senior Database Engineer/Data Architect based in Atlanta, USA, is an Oracle OCP DBA and Developer, Certified Cloud Architect Professional, and OCI Autonomous Database Specialist. With extensive expertise in database design, configuration, tuning, capacity planning, RAC, DG, scripting, Python, APEX, and PL/SQL, he combines technical mastery with a passion for innovation. Notably, Halim secured 16th place worldwide in PL/SQL Challenge Cup Playoff on the year 2010.
Monday, September 28, 2009
Subscribe to:
Post Comments (Atom)
My Blog List
-
-
-
ASSM states3 weeks ago
-
UKOUG Discover 20241 month ago
-
-
-
-
-
-
-
-
Moving Sideways8 years ago
-
-
Upcoming Events...11 years ago
-
No comments:
Post a Comment