troubleshooting Question

Count Unique Records in MySQL Table

Avatar of brendan-amex
brendan-amex asked on
Web DevelopmentPHPMySQL Server
4 Comments2 Solutions392 ViewsLast Modified:
I have a table full of different records, but many of them have the same value in Column1. What I want to do is get a count of all the duplicate values in Column1.

So for example, if Column1 has the data:

Test1
Test2
Test1
Test3
Test1

I want the output to show:
Test1 = 3
Test2 = 1
Test3 = 1

I know it’s going to require some while loops, I just don’t know where to begin. Thanks guys.
ASKER CERTIFIED SOLUTION
ralmada

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros