Subject: postquel query question.

From: Niranjan Perera <[email-masked]>
Date: Thu, 26 May 94 08:52:38 EDT

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 "[email-masked]"

   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================