Received: from mail.greatbasin.net (mail.greatbasin.net [207.228.35.39]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4PMsFA51398 for ; Fri, 25 May 2001 18:54:15 -0400 (EDT) (envelope-from jeremy@wellsgaming.com) Received: from [172.16.1.6] (rno-dsl0b-131.gbis.net [216.82.145.131]) by mail.greatbasin.net (8.9.3-MySQL-0.2.3b/8.9.3) with ESMTP id PAA06110 for ; Fri, 25 May 2001 15:54:12 -0700 (PDT) User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022 Date: Fri, 25 May 2001 15:54:13 -0700 Subject: Aggregates don't work on views? From: Jeremy Buchmann To: pgsql-admin Message-ID: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Archive-Number: 200105/141 X-Sequence-Number: 1498 Hello all, I am trying to select the sum of a column in a view, but it doesn't give me any data. Check this out (h_2535c_1_this is the view): rb=> select avg_rate from h_2535c_1_this; avg_rate -------- 40.5 51 38 37 (4 rows) rb=> select sum(avg_rate) from h_2535c_1_this; sum --- (4 rows) What's happening here? I'm using pg 6.5.3 (yes, I know it's time to upgrade, I will when it's feasible to take down our production server) on Linux 2.2.19 (SuSE). Thanks, -- Jeremy