Re: Celko: help with an experiment

From: --CELKO-- <71062.1056_at_compuserve.com>
Date: 9 Jul 2002 10:25:56 -0700
Message-ID: <c0d87ec0.0207090925.6fef08e1_at_posting.google.com>


>> One question I still have on this issue is when the aggregate
does not
refer to any columns of the table, as in

  select max(12) as Twelve from T;

for different cardinalities of T. My best try at the SQL-92 standard suggests
this should return as many rows as there are rows in T. I don't have a copy
of the 99 standard to try to decipher its verdict. <<

I would say that we build a table of (n) rows with the expression 12 in all of them, then group on the phantom column and return one row with 12 in it. If I just wrote:

 select 12 as Twelve from T;

then i woudl get (n) rows each with 12 in them. Received on Tue Jul 09 2002 - 19:25:56 CEST

Original text of this message