select tb.md,tb.mdmc,ta.rq,ta.xingqi,ta.tianqi,ta.liuru,tb.xsbs,tb.xszje from(SELECT md,rq ,xingqi ,tianqi ,liuru ,liuchu from keliu where rq>='2022-4-1' and rq<='2022-4-30' )ta join (select md,mdmc,rq,isnull(sum(xszje),0) xszje,isnull(sum(xsbs),0)xsbs from sale_daily where rq>='2022-4-1' and rq<='2022-4-30' group by md,mdmc,rq ) tb on ta.md=tb.md and ta.rq=tb.rq order by rq请教个问题,按客流关联销售表,现在有个问题,如果有一天销售没有数据,没记录,怎么默认当天为0.我用ISNULL 好像没用,请指教,感谢。