Hi,
I use an Oracle PeopleSoft Query Manager tool that doesn't let me write raw SQL, but does allow me to write expression functions that I can use as output fields.
I am currently pulling data from two separate queries (Total Grants & Total Charges) that I would like to pull in a single query.
When I pull in both types of data, the raw data rows gets messy and duplicated. (See below)
How can I modify these sample expressions to sum the Grant amounts by the distinct Student ID and Grant ID and the Charges by the distinct Student ID and Charge ID?
Grant Aggregate Expression: SUM(case when Aid_Type = Grant then Grant_Amount else 0 end)
Charges Aggregate Expression: SUM(case when Charge_Date < Withdraw_Date then Charge_Amount else 0 end)
Sample Query 1 Data from Aid Offers table

Sample Query 2 Data from Charges Table

Sample messy combined data with duplicated data rows:

Thank you in advance for any help you can provide.