Re: Help for MSSQL "Compute" equivalent in Postgres

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mkoroschetz(at)tekvoice(dot)com
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Help for MSSQL "Compute" equivalent in Postgres
Date: 2004-04-06 04:25:26
Message-ID: 19008.1081225526@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Manfred Koroschetz" <mkoroschetz(at)tekvoice(dot)com> writes:
> I am having trouble translating the following simple MSSQL query into
> the equivalent Postgres form.

> select A.ProdID, A.Description, A. Qty, A.Price
> from SoldItems as A
> where A.ListID = 15
> order by A.ProdID
> compute count(A.ProdID),sum(A.Price),sum(A.Qty)

This "compute" construct does not exist in the SQL standard, so you'll
have to forgive us for not immediately knowing what it does ... if
you'd care to specify exactly what behavior you're trying to achieve,
maybe we could help.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2004-04-06 04:31:51 Re: multiple statements.. and locking
Previous Message Nabil Sayegh 2004-04-05 12:02:56 Re: snowflaking