SQL Function Question

From: "TopShoTTa" <topshotta(at)shotta(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: SQL Function Question
Date: 2002-03-09 18:13:59
Message-ID: Hhsi8.170354$s43.37425023@typhoon.columbus.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm new to SQL and taking a course in it right now. One of the things that
I need to do for an assignment is display sum, avg, max, and min amounts
multiplied by quantity. All in one table. Here is what I'm doing but not
correct for some reason.

select (sum(price)+avg(price)+max(price)+min(price)) * quantity
from order;

I get error - not a single group function. My book is very limited on the
information so I thought I'd post here.

Thanks!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-03-09 18:17:30 Re: UNIQUE( col1, col2 ) creates what indexes?
Previous Message Tom Lane 2002-03-09 18:11:18 Re: RULE with conditional behaviour?