select DISTINCT qu_id,an_ok from kn_answer
需要qu_id 不能为重的
select DISTINCT qu_id,an_ok from kn_answer
需要qu_id 不能为重的
select DISTINCT qu_id ,sum(an_ok) from kn_answer group by quid
select *, count(distinct qu_id) from kn_answer group by qu_id
你这样试试
搜索出来的结果是不是
3 0
9 0
这样没有重复的?