请求高人帮助!!
实在是想了半天想不出来了,请求帮助啊
select u.nickname,u.uid,(select count(1) from tbl_daily d where d.D_Uid=u.uid AND '2012-02-14'<=d.D_Submitted and d.D_Submitted<='2012-02-15') as cnt from dnt_users u where u.groupid in(1,14,15,8,3,18) group by u.username;
select u.nickname,u.uid,isnull(d.cnt,0) as cntfrom dnt_users uleft join (select D_Uid,count(1) as cnt from tbl_daily '2012-02-14'<=d.D_Submitted and d.D_Submitted<='2012-02-15') don d.D_Uid=u.uid AND where u.groupid in(1,14,15,8,3,18)
[解决办法]