22,209
社区成员
发帖
与我相关
我的任务
分享
select a.*,0.0 sdsyz,' ' bz into xsgwtk
from dlcg.run.dbo.orderrec a
where a.opertime>@wtsj and a.clearamt<>0 and a.bsflag='0S'
and exists(select 1 from xsgdzjk where a.secuid=fwgddm and a.stkcode=fwzqdm)
group by a.orgid,a.custid,a.secuid,a.stkcode,a.bsflag,a.custname
--order by a.custid
没统计加什么分组???