> SELECT itm_numb, itm_desc, sls_code, tax_code, SUM(unt_qtty) AS nQty ; > FROM table1 GROUP BY itm_numb ORDER BY itm_numb >Yes, a sub query will help you in that direction. The syntax is about like this:
SELECT Table1.itm_numb,Table1.itm_desc,Table1.sls_code,Table1.tax_code,Temp.nQty; FROM (SELECT MAX(Table1.itm_numb) AS PrimaryKey,SUM(Table1.unt_qtty) AS nQty FROM Table1 GROUP BY itm_numb) AS Temp; INNER JOIN Table1 ON Temp.itm_numb=Table1.itm_numb; ORDER BY Table1.itm_numbI tested a syntax like that locally with my tables. This is usually how I do it. So, this should give you an idea on how to do it. There are various ways to achieve this. This is only one approach. I am sure you will get other replies with more ideas.