The SUM function in the Datamart query below is not working as needed.
// Get datamart context def dmContext = api.getDatamartContext() // Create datamart query def dmQueryInvoice = dmContext.newQuery(dmContext.getDatamart("Transactions"), false) dmQueryInvoice. select("INVOICE_NUMBER"). select("ACCOUNT_NAME"). select("SUM(FINAL_GIVEN_NET_PRICE)"). where(Filter.equal("INVOICE_DATEYear","2018"), Filter.equal("BILLING_TYPE","F2"))