generates
2 groups of data set:
SELECT c11 AS c1,SUM(c12) AS c2 FROM table1
GROUP BY c1
ORDER BY c2
UNION
SELECT c21 AS c1,SUM(c22) AS c2 FROM table2
GROUP BY c1
ORDER BY c2;
How do I do that? Thank you in advance!
CNLIOU
---(end of broadcast)---
TIP 6
Hello!
I vaguely remember that someone said somewhere that
EXISTS runs faster than IN:
SELECT * FROM table1 where field1 EXISTS (SELECT
field4 FROM table2)
However, all I got from version 7.1.3 is:
ERROR: parser: parse error at or near "exists"
While below works:
SELECT * FROM table1 where
Hi!
I am using MyTable to serve the "next number"
functionality like PGSQL embeded "sequence" offers.
The only difference of the two is MyTable has 2 more
fields - "ID" and "Starting Effective Date".
The UPDATE SQL fails when I am trying to update
record
ID1 | 2001-08-01| 11
to