ORA-00937: not a single-group group function
Date: 26 Apr 1994 14:20:25 GMT
Message-ID: <PGS1002.94Apr26152025_at_delphi.esc.cam.ac.uk>
Hi,
I have these two tables:
plane:
-- unique_id integer
- core integer references core (unique_id)
- depth number
observation:
-- unique_id integer
- contents integer references contents (unique_id)
- plane integer references plane (unique_id)
- data number
Combining these two like:
select P.depth, O.data from
plane P, observation O,
where (P.core = 13) and (O.plane = P.unique_id) and (O.contents = 65);
will result in a list of depths and data for a specific group of contents. Now I would like to find the tuple (depth, data) for min(depth) and max(depth). Is this possible in one statement??
select min(depth), plane.unique_id from
plane, observation
where (plane.core = 13 and
observation.plane = plane.unique_id and
observation.contents = 56);
Results in ORA-00937: not a single-group group function
I can ofcourse split it in different select statements, but I would like to keep it as simple as possible.
Please reply by email
Thanks in advance,
Paul Received on Tue Apr 26 1994 - 16:20:25 CEST