Re: Help for MSSQL "Compute" equivalent in Postgres - Mailing list pgsql-novice

From Tom Lane
Subject Re: Help for MSSQL "Compute" equivalent in Postgres
Date
Msg-id 19008.1081225526@sss.pgh.pa.us
Whole thread Raw
In response to Help for MSSQL "Compute" equivalent in Postgres  ("Manfred Koroschetz" <mkoroschetz@tekvoice.com>)
Responses Re: Help for MSSQL "Compute" equivalent in Postgres
List pgsql-novice
"Manfred Koroschetz" <mkoroschetz@tekvoice.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

pgsql-novice by date:

Previous
From: "Colin Gillespie"
Date:
Subject: Formating Dates
Next
From: Tom Lane
Date:
Subject: Re: multiple statements.. and locking