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

From Manfred Koroschetz
Subject Help for MSSQL "Compute" equivalent in Postgres
Date
Msg-id 20040330T161618Z_B1B3000E0000@tekvoice.com
Whole thread Raw
Responses Re: Help for MSSQL "Compute" equivalent in Postgres
List pgsql-novice
I am having trouble translating the following simple MSSQL query into the equivalent Postgres form.
Aggregate functions seam the way to go, but I have not been able to reproduce the totals at the
end of the query (not on each individual row).
 
Original MSSQL Query:
 
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)
 
Appreciating any help in advance,
 
Manfred Koroschetz
mkoroschetz@rkmus.com

pgsql-novice by date:

Previous
From: farqua
Date:
Subject: Re: Problem with pgaccess
Next
From: Benjamin
Date:
Subject: multiple statements.. and locking