Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Trivial
-
Resolution: Unresolved
-
10.2(EOL)
-
None
Description
Semantics of the query below is vague at best, I can't even say what the expected result should be; if the standard does not require such queries to be supported, maybe it would be better to disable them altogether than invent some rules for them.
drop table if exists empsalary; |
create table empsalary (depname varchar(32), empno smallint primary key, salary int); |
insert into empsalary values ('develop',1,5000),('develop',2,4000),('sales',3,'6000'),('sales',4,5000); |
SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary group by depname; |
+---------+-------+--------+-----------------------------------------+ |
| depname | empno | salary | avg(salary) OVER (PARTITION BY depname) | |
+---------+-------+--------+-----------------------------------------+ |
| develop | 1 | 5000 | 5000.0000 |
|
| sales | 3 | 6000 | 6000.0000 |
|
+---------+-------+--------+-----------------------------------------+ |
2 rows in set (0.00 sec) |
Attachments
Issue Links
- relates to
-
MDEV-9896 Testing for window functions
- Open