标签:class 方法 一个 _id 内容 关系 nbsp 解决方法 tin
问题:
select distinct count(cont.cont_ID) proj_cont_numb, ......
原来的代码,是要统计 cont.cont_id 字段的个数,因为一个人,就有一个不同的cont_id.
如果出现非一对一关系的话,这样统计出来的数据是不准确的.
解决方法:
select distinct count(distinct cont.cont_ID) proj_cont_numb, ......
这样就可以对同一字段的不同内容进行统计.
标签:class 方法 一个 _id 内容 关系 nbsp 解决方法 tin
原文地址:https://www.cnblogs.com/Night-Watch/p/9493624.html