Saturday, 10 August 2013

How to count who has most hits in MySQL

How to count who has most hits in MySQL

I have a table with a column called bid and I would like to list how many
records there exists with each bid value.
Kind of making a TOP TEN list.
Example:
bid with value 1 has 5 entries/rows. bid with value 2 has 3 entries/rows.
bid with value 3 has 8 entries/rows. etc
How do I make a query that counts and sums up each of the bid's and sort
the in a DESCending order?
Thankful for any kind of help!

No comments:

Post a Comment