Please edit my query how to remove the duplicate row ? attached of result in below -------------------------------------------select isnull(xsodetail.txdate,'') As Date,case when xsoheader.shopcode is null then ' Total' else 'Shop '+xsoheader.shopcode end as shop, round(sum(isnull(xsopayment.paymentamt,0)),0) as Amount,sum(isnull(xsoheader.depositamt,0)) as Deposit_Amount,isnull(xsopayment.paymentcode,'') as Paycode,isnull(max(xsodetail.sku),'') as COUPON,sum(isnull(xsodetail.itemamt,0)) as amount,sum(isnull(xsodetail.salesqty,0)) as Qty

select isnull(xsodetail.txdate,'') As Date,case when xsoheader.shopcode is null then ' Total' else 'Shop '+xsoheader.shopcode end as shop, round(sum(isnull(xsopayment.paymentamt,0)),0) as Amount,sum(isnull(xsoheader.depositamt,0)) as Deposit_Amount,isnull(xsopayment.paymentcode,'') as Paycode,isnull(max(xsodetail.sku),'') as COUPON,sum(isnull(xsodetail.itemamt,0)) as amount,sum(isnull(xsodetail.salesqty,0)) as Qty