Help for MSSQL "Compute" equivalent in Postgres

Поиск
Список
Период
Сортировка
От Manfred Koroschetz
Тема Help for MSSQL "Compute" equivalent in Postgres
Дата
Msg-id 20040330T161618Z_B1B3000E0000@tekvoice.com
обсуждение исходный текст
Ответы Re: Help for MSSQL "Compute" equivalent in Postgres  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: farqua
Дата:
Сообщение: Re: Problem with pgaccess
Следующее
От: Benjamin
Дата:
Сообщение: multiple statements.. and locking