Using Aggregate function to fetch values from different tables in SAP

SAP HANASAPSAP Basis

First of all, the example you gave has different description for a fund. So, you should know which one to be kept. If you want to keep any description, you can use the below query using aggregation functions

SELECT
   X1."FundName"
   ,min( X0."Dscription")
   , X0."FundId"
FROM INV1 X0
INNER JOIN OINV X1 ON X0."FundId" = X1."FundId"
INNER JOIN NNM1 X2 ON X1."SourceId" = X2."SourceId"
WHERE X1."FundTotal" > 1000
AND X0."FundStart" between [%1] and [%2]
GROUP BY X1."FundName", X0."FundId"
raja
Published on 12-Dec-2017 07:30:53
Advertisements