id captureId faceId personId score state 81 36 76 76 760 0 82 36 74 74 600 1
83 36 70 70 590 2 84 39 89 89 690 0 85 39 51 51 600 0 86 39 59 59 590 0 87 40 82 82 610 1 88 40 47 47 600 0 我想得到 根据captureId 分组之后 state全等于0的结果集 请大家帮忙写个SQL语句 谢谢了
83 36 70 70 590 2 84 39 89 89 690 0 85 39 51 51 600 0 86 39 59 59 590 0 87 40 82 82 610 1 88 40 47 47 600 0 我想得到 根据captureId 分组之后 state全等于0的结果集 请大家帮忙写个SQL语句 谢谢了
select * from 你的表名 where captureId in
(
select captureId from 你的表名 where state=0 group by captureId
);
直接用select * from table where state=0 group by captureID.
用select *才可以保证选出来的是集,直接用state=0就可以保证全部都是state=0,而不会出现其他的组合出来的state=0的情况。谢谢