Bernt M. Johnsen wrote:
I think that this is a different issue than Derby-127. Derby-127 concerned the combination of group by with order by. The two are probably related. Please file a separate Jira-report for this one.I stumbeled across this strange behaviour when combining coumn alias and group by:
ij> select * from tt;
I |J -----------------------
1 |2 2 |3 1 |2 2 |3 2 |3
5 rows selected
ij> select i, count(*) as cnt from tt group by i;
I |CNT -----------------------
1 |2 2 |3
2 rows selected
ij> select i, count(*) as i from tt group by i;
I |I -----------------------
1 |1 2 |2
2 rows selected
The last select is obviously wrong! This might be related to DERBY-127, but if it's not I'll file it asa separate issue.
Jack Klebanoff
