
|
If you were logged in you would be able to see more operations.
|
|
|
|
File Attachments:
|
|
|
Environment:
|
Eclipse 3.2.2; java 1.5.0_11;
|
|
Issue Links:
|
Incorporates
|
|
|
|
This issue is part of:
|
|
DERBY-2034
Tracking of bugs that lead to incorrect results being stored or returned to the client
|
|
|
|
|
Reference
|
|
|
|
This issue is related to:
|
|
DERBY-681
Eliminate the parser's rewriting of the abstract syntax tree for queries with GROUP BY and/or HAVING clauses
|
|
|
|
|
|
|
| Urgency: |
Urgent
|
| Bug behavior facts: |
Regression
|
| Resolution Date: |
24/Jan/08 09:59 PM
|
|
The result of the select is not sorted in "order by COUNT(*) DESC" or "order by COUNT(*) ASC"
create table yy (a double, b double);
insert into yy values (2, 4);
insert into yy values (5, 7);
insert into yy values (2, 3);
insert into yy values (2, 3);
insert into yy values (2, 3);
insert into yy values (2, 3);
insert into yy values (9, 7);
select b, COUNT(*) AS "COUNT_OF", SUM(b) AS "sum b"
from yy
where a = 5 or a = 2
group by b
order by COUNT(*) asc
-- same result as:
select b, COUNT(*) AS "COUNT_OF", SUM(b) AS "sum b"
from yy
where a = 5 or a = 2
group by b
order by COUNT(*) desc
|
|
Description
|
The result of the select is not sorted in "order by COUNT(*) DESC" or "order by COUNT(*) ASC"
create table yy (a double, b double);
insert into yy values (2, 4);
insert into yy values (5, 7);
insert into yy values (2, 3);
insert into yy values (2, 3);
insert into yy values (2, 3);
insert into yy values (2, 3);
insert into yy values (9, 7);
select b, COUNT(*) AS "COUNT_OF", SUM(b) AS "sum b"
from yy
where a = 5 or a = 2
group by b
order by COUNT(*) asc
-- same result as:
select b, COUNT(*) AS "COUNT_OF", SUM(b) AS "sum b"
from yy
where a = 5 or a = 2
group by b
order by COUNT(*) desc
|
Show » |
|