Sort MYSQL Data By Number of Entries

Posted by Belgin Fish on Stack Overflow See other posts from Stack Overflow or by Belgin Fish
Published on 2010-05-22T20:33:10Z Indexed on 2010/05/22 20:40 UTC
Read the original article Hit count: 130

Filed under:

Hi, I'm wondering how I can sort mysql data based on the number of entries.

I'm doing this so I can have a page of the top purchases, so it would have to retrieve all the product_id's from a table, and then sort them by the most times one shows up, limiting it to 10 or something.

Thanks!

© Stack Overflow or respective owner

Related posts about mysql