Created
August 30, 2023 10:23
-
-
Save machinelearningplus/c95561c929a83b85356105965b2ac42f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS demand2; | |
CREATE TABLE demand2 ( | |
day INT, | |
qty FLOAT | |
); | |
INSERT INTO demand2 | |
(day, qty) | |
VALUES | |
(1, 10), | |
(2, 6), | |
(3, 21), | |
(4, 9), | |
(6, 12), | |
(7, 18), | |
(8, 3), | |
(9, 6), | |
(10, 23); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
select day,qty,cume_dist(qty) over(order by qty)as cum_qty
from demand2;