On Thu, Sep 01, 2005 at 02:51:21PM -0400, D. Richard Hipp wrote:
Oracle9i Enterprise Edition Release 9.2.0.4.0:
SQL> SELECT a, b, sum(c) FROM t1 GROUP BY a, b ORDER BY 3;
A B SUM(C)
-- -- ------
1 2 2
2 4
1 8
16
> Can I get some volunteers to run the SQL shown below on various
> other SQL database engines and tell me what the output is?
>
> CREATE TABLE t1(a INTEGER, b INTEGER, c INTEGER);
> INSERT INTO t1 VALUES(1,2,1);
> INSERT INTO t1 VALUES(NULL,2,2);
> INSERT INTO t1 VALUES(1,NULL,4);
> INSERT INTO t1 VALUES(NULL,NULL,8);
> INSERT INTO t1 SELECT * FROM t1;
> SELECT a, b, sum(c) FROM t1 GROUP BY a, b ORDER BY 3;
--
Andrew Piskorski <[EMAIL PROTECTED]>
http://www.piskorski.com/