Count duplicates records in MySQL table?
Answers
Answered by
0
have table with, folowing structure.
tbl
id name
1 AAA
2 BBB
3 BBB
4 BBB
5 AAA
6 CCC
select count(name) c from tbl
group by name having c >1
The query returning this result:
AAA(2) duplicate
BBB(3) duplicate
CCC(1) not duplicate
The names who are duplicates as AAA and BBB. The final result, who I want is count of this duplicate records.
Result should be like this: Total duplicate products (2)
make me brainlist
Similar questions
English,
6 months ago
Economy,
6 months ago
Math,
6 months ago
Computer Science,
11 months ago
Computer Science,
11 months ago
Biology,
1 year ago
Hindi,
1 year ago