No Parameters
Returns: decimal
Example
query:
SELECT account, order_value, CUME_DIST() OVER ( PARTITION BY account ORDER BY order_value desc)
FROM jun_2017_orders
result:
account | order_value | cume_dist |
---|---|---|
Betasoloin | 5182 | 0.2 |
Betasoloin | 5100 | 0.4 |
Betasoloin | 4492 | 0.6 |
Betasoloin | 2887 | 0.8 |
Betasoloin | 1036 | 1.0 |
Gekko & Co | 5622 | 0.14285714285714285 |
Gekko & Co | 5304 | 0.2857142857142857 |
Gekko & Co | 5031 | 0.42857142857142855 |
Gekko & Co | 1075 | 0.5714285714285714 |