select distinct(cetshnumber), INVOICEITEMS.ItemQuantity 'Quantity Manufactured',INVOICEITEMS.ItemQuantity 'Quantity Cleared' from INVOICEITEMS,invoice,cetsh where invoice.invoicenumber=invoiceitems.invoicenumber and month(InvoiceDate)=11 and year(InvoiceDate)=2012 group by cetshnumber,INVOICEITEMS.ItemQuantity
I have given distinct but still the cetshnumber value is repeated for each record.
Note that distinct wont work that way. It is applied to entire column set and not on cetshnumber only. If there are m,ultiple ItemQuantity associated to each cetshnumber , the cetshnumber will get repeated. You may need to remove ItemQuantity in GROUP BY cluae and use min or max on it