Return-Path: owner-postman Received: from LOCALHOST (LOCALHOST [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id FAA08599 for postgres-redist; Thu, 26 May 1994 05:52:50 -0700 Resent-From: POSTGRES mailing list Resent-Message-Id: <199405261252.FAA08599@nobozo.CS.Berkeley.EDU> X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host LOCALHOST didn't use HELO protocol Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from pollux.cs.uga.edu (pollux.cs.uga.edu [128.192.4.5]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id FAA08589 for ; Thu, 26 May 1994 05:52:48 -0700 Received: by pollux.cs.uga.edu (4.1/25-eef) id AA27280; Thu, 26 May 94 08:52:38 EDT Date: Thu, 26 May 94 08:52:38 EDT From: Niranjan Perera Message-Id: <9405261252.AA27280@pollux.cs.uga.edu> To: postgres@postgres.Berkeley.EDU Subject: postquel query question. Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Thu, 26 May 94 05:52:50 -0700 Resent-XMts: smtp I have the following class: emp ( name, ssn, sal, dno ) I would like to construct a postquel query that would do the following: find the average salary of employees grouped by `dno'. i.e I would like to find the average salary in department 1, 2, 3 etc.. The SQL version of this query is: select avg(sal) from emp group by dno. Any suggestions ? Thanks, -- Niranjan p.s: postgres version 4.2. ============================================================================== To add/remove yourself to/from the POSTGRES mailing list: send mail with the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU" If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and a human will deal with it. DO NOT post to the "postgres" mailing list. ==============================================================================