Skip to content
Developerhome
Sage Distribution and Manufacturing Operations

Read with aggregation

  Less than to read

The following table displays an example and the result of a query to compute aggregated values for a set of records without reading the details of the record set. Some of the fields displayed are not mandatory and others have been omitted.

{ 
    xtremMasterData { 
        item { 
            readAggregate(filter: "{purchaseUnit:{_ne:null}}") {
                weight { 
                    sum 
                    avg 
                    distinctCount 
                } 
            } 
        } 
    }
} 
{ 
    "data": { 
        "xtremMasterData": { 
            "item": { 
                "readAggregate": { 
                    "weight": { 
                        "sum": "6.27", 
                        "avg": "0.1393333333333", 
                        "distinctCount": 9 
                    } 
                } 
            } 
        } 
    }, 
    "extensions": { 
        "diagnoses": [] 
    } 
}