SELECT COUNT(*) FROM test_users WHERE 1 = 1 GROUP BY email,passwords
COUNT(*)
1
2
1
1
显然这不是我要的结果,这样统计出来的是相同email和passwords的各个记录数量之和,下面这样就可以了
SELECT COUNT(DISTINCT email,passwords) FROM `test_users` WHERE 1 = 1
COUNT(*)
1
2
1
1
显然这不是我要的结果,这样统计出来的是相同email和passwords的各个记录数量之和,下面这样就可以了
SELECT COUNT(DISTINCT email,passwords) FROM `test_users` WHERE 1 = 1