blob: 36600ce1f898cd7cbf0a9cfd8c283b445fa0311e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
---------------------------------------------------------------------------
--
-- group_err.sql-
-- test illegal use of GROUP BY (with aggregates)
--
--
-- Copyright (c) 1994-5, Regents of the University of California
--
-- $Id: group_err.sql,v 1.1.1.1 1996/07/09 06:22:30 scrappy Exp $
--
---------------------------------------------------------------------------
create table G_ERR (x int4, y int4, z int4);
select x from G_ERR group by y;
select x, sum(z) from G_ERR group by y;
select x, count(x) from G_ERR;
select max(count(x)) from G_ERR;
select x from G_ERR where count(x) = 1;
create table H_ERR (a int4, b int4);
select y, a, count(y), sum(b)
from G_ERR, H_ERR
where G_ERR.y = H_ERR.a group by y;
drop table G_ERR, H_ERR;
|