Subselect returning 2 columns - Mailing list pgsql-sql

From Francesc Leveque
Subject Subselect returning 2 columns
Date
Msg-id 4099FCB4.1090300@loroadictos.com
Whole thread Raw
Responses Re: Subselect returning 2 columns
List pgsql-sql
Hello,

Is correct to do something like?:

SELECT row1,row2 FROM mytable
WHERE (row1,row3) IN
(SELECT row1 as p1,MAX(row3) as p2 FROM mytable
WHERE row3 <= current_date
GROUP BY row1)

I mean, I don't see documentation about subselects returning more than 
one column, but it seems to work...

Thanks,
Francesc.



pgsql-sql by date:

Previous
From: "Andrei Bintintan"
Date:
Subject: Re: not really SQL but I need info on BLOBs
Next
From: Tom Lane
Date:
Subject: Re: Subselect returning 2 columns