I'd like to reference values returned by a subselect in the same SELECT
query.
Example:
SELECT id,
( SELECT COUNT(*) FROM second ) AS value_to_reference,
( value_to_reference + 1 ) AS value_that_uses_referenced_one
FROM first;
Any suggestions?
Thank you,
Marco
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly