X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 52384476237 for ; Tue, 15 Apr 2003 10:54:00 -0400 (EDT) Received: from secure.tritus.ca (baxter.tritus.ca [209.47.166.15]) by postgresql.org (Postfix) with ESMTP id AA16D4758F1 for ; Tue, 15 Apr 2003 10:53:58 -0400 (EDT) Received: from [10.200.200.129] (CPE00045ae165bc-CM014320108734.cpe.net.cable.rogers.com [::ffff:24.157.7.10]) (AUTH: CRAM-MD5 adam@tritus.ca, TLS: TLSv1/SSLv3, 168bits, DES-CBC3-SHA) by secure.tritus.ca with esmtp; Tue, 15 Apr 2003 10:54:01 -0400 Date: Tue, 15 Apr 2003 10:53:52 -0400 From: Adam Sherman To: pgsql-sql@postgresql.org Subject: Percentage of Total Occurances Message-ID: <6790000.1050418432@saturn> X-Mailer: Mulberry/3.0.3 (Linux/x86) X-OpenPGP: 82C7 7288 650F 8F77 2FFB C170 3698 125A 79C3 FC80 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Spam-Status: No, hits=-6.6 required=5.0 tests=BAYES_01 version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/228 X-Sequence-Number: 12929 I have a table being used for poll results: id poll_id question_id answer_id datestamp I what to figure out the percentage or respondants that gave each answer. This is based on occurance rather than values. I want to be able to figure it out for a single (poll_id,qustion_id) combination and also for multiple questions. Thanks for your help, A. -- Adam Sherman Tritus CG Inc. http://www.tritus.ca/ +1 (613) 797-6819