group by后面多个字段,只想按照第一个字段
select M.cCusName ,M.cSOCode ,M.dDate,D.cInvName,D.cInvCode,D.iQuantity,D.iUnitPrice,D.iNatMoney from SO_SOMain M,SO_SODetails D where D.cSOCode = M.cSOCode GROUP BY M.cSOCode ,M.cCusName,M.dDate,D.cInvName,D.cInvCode,D.iQuantity,D.iUnitPrice,D.iNatMoney
select M.cCusName ,M.cSOCode ,M.dDate,D.cInvName,D.cInvCode,D.iQuantity,D.iUnitPrice,D.iNatMoney
from SO_SOMain M,SO_SODetails D
where D.cSOCode = M.cSOCode
GROUP BY M.cSOCode ,M.cCusName,M.dDate,D.cInvName,D.cInvCode,D.iQuantity,D.iUnitPrice,D.iNatMoney
order by M.cCusName