I would like to achieve something like this:
SELECT col1,col2-(SELECT foo FROM table1)
FROM table2
WHERE col2>(SELECT foo FROM table1)
Without SELECTing foo twice.
Can I do that with Oracle SQL? Would it be more efficient than SELECTing twice (or multiple times)?