Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.1.0
Description
Drill:
> SELECT CUME_DIST() OVER (ORDER BY ss.ss_store_sk) FROM store_sales ss ORDER BY 1 LIMIT 20; +---------------------+ | EXPR$0 | +---------------------+ | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | | 0.9923989432198661 | +---------------------+ 20 rows selected (17.317 seconds)
Postgres
# SELECT CUME_DIST() OVER (ORDER BY ss.ss_store_sk) FROM store_sales ss ORDER BY 1 LIMIT 20; cume_dist ------------------- 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 0.158622193275665 (20 rows)
Attachments
Issue Links
- duplicates
-
DRILL-3327 row_number function returns incorrect result when only order by clause is specified
- Closed