I would like to know if there's a way to use cross apply the way I'm using it on MSSQL.
Select
pt.PersonName,
psc.Charges,
psc.Taxes
from tbl.PersonTable pt
cross apply(
Select
PersonName,
sum(Charges) Charges,
sum(Taxes) Taxes
From tbl.PersonSumCharges psc
Where psc.PersonID = pt.PersonID
Group by PersonName
)psc
I'm quite new to Greenplum so I apologize for this noobish question. :)
Just use a
join
andgroup by
:I don't think that Greenplum supports lateral joins.