求大神些帮帮我,我试了很多次一直错的,在SQL SERVCER 上是对的,但是到了LINQ就不对,用软件转换过来的也不对。
下面是我的sql语句
select gi.vchGoodId,gi.vchGoodName,gi.vchGoodsBrief,ag.decSalePriceRetail,ag.vchGoodsThumbUrl,ag.vchLabelName, count(od.vchGoodId) 数量
from tabGoodsInfo gi
left join tabBillSalesOrderDetail od on gi.vchGoodId=od.vchGoodId
left join tabGoodsAttrGroup ag on gi.vchGoodId=ag.vchGoodId
left join tabGoodsWebAndMenu wm on gi.vchGoodId=wm.vchGoodId
where wm.vchGoodMenuId='010101' and ag.vchIsWebCanUse='是' and ag.vchIsBiszCanUse='是'
and gi.vchIsUsing='是' and gi.vchIsShelf='是' and ag.vchIsDefault='是'
and wm.vchGoodId=gi.vchGoodId
group by gi.vchGoodId,gi.vchGoodName,gi.vchGoodsBrief,ag.decSalePriceRetail,ag.vchGoodsThumbUrl,ag.vchLabelName
order by COUNT(od.vchGoodId) desc