Select vendorid,vendorname,cnt() as vendorcnt,sum(qtyrecv) as qtyrecv, ; sum(qtyrej) as qtyrej,round(100*sum(qtyrej)/sum(qtyrecv),2) as perrej ; from rejects group by 1Thanks for the code again. Where do I need to put this? Do I need to take out Cetin's 1st version of code and put the code that you gave me or just the code before scan? Please advice.