
1 supersf OP Gemini 反馈可以用 min 和 max SELECT count(*) FROM ( SELECT a, b FROM table GROUP BY a, b HAVING min(c) <> max(c) ) AS t; |
2 lyis 99 天前 1.加索引 (a,b,c) 2.试试 SELECT a,b FROM table T1 WHERE EIXSTS( SELECT 1 FRO table T2 WHERE T1.a=T2.a and T1.b=T2.b and T1.c<>T2.c ) |
3 andykuen959595 99 天前 数据有多少?按 2 楼的方法,给 abc 加个索引试试 |