mysql题目求每个name对应的数量都大于3的信息【多测师_王sir】【软件测试】
题目:
求每个name对应的数量都大于3的信息
SELECT tt.name FROM ( SELECT c.* FROM ceshi c WHERE c.number >=3 AND NOT EXISTS( SELECT 1 FROM ceshi a WHERE a.number < 3 AND c.name = a.name ) ) tt GROUP BY tt.name; SELECT c.* FROM ceshi c WHERE c.number >=3 AND NOT EXISTS( SELECT 1 FROM ceshi a WHERE a.number < 3 AND c.name = a.name ) ;