Q: Select Which User Has More Products I have a table products:
id    user    products
1     user1   product
2     user2   product
3     user1   product
4     user3   product
5     user4   product

Now I want to get which user has the most products (user1)
SELECT * FROM products WHERE ...

Any suggestion for SQL query?

A: You could du something like this:
SELECT `p`.`user` FROM `products` as p GROUP BY `user` ORDER BY count(id) DESC LIMIT 1

