Using Aggregate function to fetch values from different tables in SAP



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"
Updated on: 2019-12-05T08:04:28+05:30

325 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements