Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f5KGNja83438 for ; Wed, 20 Jun 2001 12:23:45 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from necker.ac-rouen.fr (smtp.ac-rouen.fr [194.167.110.3]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5D9FjE14825 for ; Wed, 13 Jun 2001 05:16:03 -0400 (EDT) (envelope-from david.bouriaud@ac-rouen.fr) Received: from ac-rouen.fr (localhost.localdomain [127.0.0.1]) by necker.ac-rouen.fr (8.11.0/8.11.0) with ESMTP id f5D9HKd02316 for ; Wed, 13 Jun 2001 11:17:20 +0200 Message-ID: <3B272F9A.C8089ED6@ac-rouen.fr> Date: Wed, 13 Jun 2001 11:17:14 +0200 From: David BOURIAUD X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.14 i686) X-Accept-Language: fr, en MIME-Version: 1.0 To: "pgsql-sql@postgresql.org" Subject: Help on a sql querry. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200106/306 X-Sequence-Number: 3569 Hi the list ! I've got a table in which I've got informations about persons. I'd like to know how many there are by etablissements, and the detail by sex. So, here is how my table is described : table can : num_can //candidate number nom_can //name ... cod_sex //sex of candidate : M=Man, F = Woman ... cod_eta // Etablissemnt where this person is. Any idea ? I'd like to avoid unions, cause it makes many lines for too few informations.... Thanks by advance. -- David BOURIAUD ---------------------------------------------------------- In a world without walls or fences, what use do we have for windows or gates ? ---------------------------------------------------------- ICQ#102562021