您如何在查询中引用从外部联接创建的“组合实体”?具体如何替换“??” 在下面的查询中:
SELECT TableA.x,
??.y --How do you select from the combined entity?
FROM TableA,
TableB buys
FULL OUTER JOIN TableB sells ON buys.run_id = sells.run_id
AND buys.specie_id = sells.specie_id
AND buys.account_id = sells.account_id
WHERE TableA.id = ??
AND -- want to join this with the "combined entity" resulting from the outer join
buys.buy = 'Y'
AND -- Is this valid or does this have to be within the Outer join statement?
sells.buy = 'N';