NTILE window function returns incorrect results #6829
Last updated: 2020-02-24 09:32:58 +0100
Date: 2020-02-21 10:25:12 +0100
The NTILE window function is returning incorrect results in some cases. In the example below, the function divides the result set in more buckets than specified in the function argument.
How to reproduce:
create table employees (dep varchar(10), name varchar(20), salary double, hire_date date);
2 - Execute this query, which gives incorrect results
SELECT dep, name, salary, NTILE(4) OVER (ORDER BY hire_date) FROM employees;
It should divide the 10 rows into 4 buckets, but it returns a 5 for the last row, which is incorrect.
Date: 2020-02-21 11:19:22 +0100
For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=670675a1ce57
The text was updated successfully, but these errors were encountered: