Re: Puzzle: What should this query return?

From: Peter Gulutzan <pgulutzan_at_yahoo.ca>
Date: 29 Jun 2002 18:55:20 -0700
Message-ID: <bc8f8132.0206291755.298592a4_at_posting.google.com>


Steve Kass <skass_at_drew.edu> wrote in message news:<3D1DE185.7234FF7D_at_drew.edu>...
> I might have gotten the results backwards in my first post, that's all.
Yes, that's why I couldn't reproduce what you were saying. Now I can, and
Ocelot is indeed foiled by this query, the answer cannot be 0. When it replied "I give up" that was a better answer. Anyway, we agree that's not the issue.

The standard says: GROUP BY <grand total> is implicit because the <select list> contains a <value expression> that contains a <set function specification>, namely COUNT. This rule doesn't depend on whether COUNT's value is returned.
But how many groups are in the grand total if the set function isn't evaluated? Dunno.

Peter Gulutzan
Ocelot Computer Services Inc. Received on Sun Jun 30 2002 - 03:55:20 CEST

Original text of this message