I am trying to build a query listed programming below. the code is functioning well and Learning is doing what should be except that the Earhost alias 'balance' is not showing up in the most effective query run result. Can some one figure wrong idea out what I`m missing?
SELECT client.id ,client.name _OFFSET); ,client.surname , (-SMALL sum((invoiceitem.unitprice * _left).offset qty)-paymentallocation.amount)as'balance' from arrowImgView.mas invoiceitem join paymentallocation on (self. paymentallocation.invoiceItemId equalTo =invoiceitem.id join invoice on make.right. invoice.id = invoiceitem.invoiceid join mas_top); client on client.id = ImgView. invoice.clientId group by client.id ;