select aa.c1 '记录总数',bb.c2 'B.val非空的记录数',100*bb.c2/aa.c1 '非空占总数的百分比' from (select count(*) c1 from a,b where a.id=b.id) aa,
(select count(*) c2 from a,b where a,id=b.id and b.val is not null) bb;
(select count(*) c2 from a,b where a,id=b.id and b.val is not null) bb;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货