Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 46482 invoked from network); 13 May 2005 01:11:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 May 2005 01:11:23 -0000 Received: (qmail 30508 invoked by uid 500); 13 May 2005 01:15:33 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 30477 invoked by uid 500); 13 May 2005 01:15:33 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 30461 invoked by uid 99); 13 May 2005 01:15:33 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from e1.ny.us.ibm.com (HELO e1.ny.us.ibm.com) (32.97.182.141) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 12 May 2005 18:15:32 -0700 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e1.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j4D1BIpq029799 for ; Thu, 12 May 2005 21:11:18 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j4D1BHTE102300 for ; Thu, 12 May 2005 21:11:17 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11/8.13.3) with ESMTP id j4D1BH8J029875 for ; Thu, 12 May 2005 21:11:17 -0400 Received: from [9.48.123.18] (sig-9-48-123-18.mts.ibm.com [9.48.123.18]) by d01av03.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j4D1BGn5029865 for ; Thu, 12 May 2005 21:11:17 -0400 Message-ID: <4283FEC3.2030600@sbcglobal.net> Date: Thu, 12 May 2005 18:11:31 -0700 From: Jack Klebanoff User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Development Subject: Re: Strange behaviour when combining column alias and group by References: <20050512085353.GC18345@atum01.norway.sun.com> In-Reply-To: <20050512085353.GC18345@atum01.norway.sun.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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