db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Klebanoff <klebanoff-de...@sbcglobal.net>
Subject Re: Strange behaviour when combining column alias and group by
Date Fri, 13 May 2005 01:11:31 GMT
Bernt M. Johnsen wrote:

>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.
>
>
>  
>
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.

Jack Klebanoff

Mime
View raw message