Does anyone knows a equivalent in ORACLE PL/SQL for the SQL Server CROSS APPLY
statement? If so what I want is, in a aggregation sub-query alias as a table, just do the aggregation for those IDs and don't do the aggregation for the whole table, before pick up the values that I need.
Quick example:
SELECT A.Val1, B.Val2
FROM TABLE1 A
CROSS APPLY ( SELECT SUM(Val2) AS Val2 FROM Table2 T2 WHERE T2.FK1 = A.PK1) B