标签: mysql join group-by having
select seq from a where link != 1
seq | link 1 | 1 1 | 0 2 | 0 3 | 1 4 | 0
我希望不在1:2,4中返回seq
答案 0 :(得分:0)
SELECT seq FROM a GROUP BY seq HAVING SUM(link = 1) = 0;
SQL Fiddle