Use queryAndFetch() to calculate sum, min, max, average and count of the resultset of a NXQL query