» posted on Thursday, January 21st, 2010 at 10:23pm by Dan
MySQL Select Count Distinct – Counting and Identifying Duplicate Records
Looking for a [relatively] quick way to identify duplicate records in a table and list how many records there are for each duplicate? Look no further.
In my case, I’ve got a table named Searches which tracks queries on one of my sites. I wanted to check the top queries, so I used this SQL statement:
There you have it. A simple, effective way to count and label duplicate records.
» Keywords
army
asp
buffer
cell phone
Code
css
domain tools
domain valuation
free flv player
freelance
free mp3 player
free mp4 player
google pagerank
haval
internet through cell phone
loading
md5
motorola razr
phone
PR
recordset
sha1
sha256
sha384
sha512
snefru
soldiers
voice mail
web flv player
website monitoring
Web Tools
![[del.icio.us]](http://www.randomtools.net/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.randomtools.net/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://www.randomtools.net/wp-content/plugins/bookmarkify/facebook.png)
![[Google]](http://www.randomtools.net/wp-content/plugins/bookmarkify/google.png)
![[Reddit]](http://www.randomtools.net/wp-content/plugins/bookmarkify/reddit.png)
![[Slashdot]](http://www.randomtools.net/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](http://www.randomtools.net/wp-content/plugins/bookmarkify/stumbleupon.png)