数据如下、
yue name age
1 2 2
1 3 3
1 3 4
1 2 6
2 2 3
2 3 2
这咋进行计数判断....判断 name是否有两个等于2的age 每个yue
select * from
(select yue,name,age,count(1) as cs from 表 group by yue,name,age)
where cs=2 and age=2