Hi Rohit,
You can aggregate the columns of objects (without metadata) that are necessary for the derivation of aggregation
by explicitly denoting the column names and the functions to use, as illustrated in the following example of a
service definition: sample.odata:aggrexpl.xsodata
service {
"sample.odata::revenues" as "Revenues"
keys generate local "ID"
aggregates always (SUM of "Amount");
}
The results of the entity set Revenues always contain the aggregated value of the column Amount. To extract the aggregated revenue amount per year, add $select=Year,Amount to your requested URI.
When there are unquie id's(like sales order number) in the result of the odata call then Aggregation will not happen, remove the unique id by using $select in the URI without the uniqueid
Best Regards,
Ranjit