sum of two queries - Mailing list pgsql-sql

From Kyle Bateman
Subject sum of two queries
Date
Msg-id 371F5BBF.874251FD@actarg.com
Whole thread Raw
List pgsql-sql
Is there a way to return the sum of two separate queries as in:

select (select sum(price) from items) + (select sum(price) from
widgets))

select 3 + 4 works OK but the parser doesn't like sticking a subquery in
place
of the numbers.

Is there another way to do this?

kyle@actarg.com




pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] Finding the "most recent" rows
Next
From: Daniel Facciolo Pires
Date:
Subject: ...