select agent,
case when qq is null then 0 else 16.67 end q1,
case when email is null then 0 else 16.67 end e1,
case when addr is null then 0 else 16.67 end a1,
case when birthdate is null then 0 else 16.67 end b1,
case when childname is null then 0 else 16.67 end c1,
case when buydate is null then 0 else 16.67 end y1
from emc_srv_card
我要做资料完整度计算,如图,信息录入为空的字段为0,不为空为16.67
我要的结果如下:
agent 资料完整度
liwei 95.12%
李威 96.12%
admin 98.12%
==================各位请帮帮忙,我一共才27分了。