按id mysql / php的最大出现次数对数据库表进行排序

I have a table 'favoriteSellers' with columns

uniqueId userId sellerId
1        33     31
2        33     32
3        31     32
4        32     33
5        32     32
6        31     33

I need to be able to call the most favorited sellerIds in order. So in the above it would return Id 32, then 33, then 31

I have no idea the correct sql statement to do this!

SELECT sellerId, COUNT(*) AS bestSeller FROM favoriteSellers ORDER BY bestSeller DESC

Try this. just off the top off my head I think this may do what you wish