我只希望重复显示最少的计数,如图像1中所示。但是我有问题
SELECT bidprice, user_id, COUNT(*)
FROM auction_details WHERE product_id = '1'
GROUP BY bidprice
答案 0 :(得分:1)
如果只需要较低的计数结果,则可以使用限制1
SELECT bidprice, user_id, COUNT(*) my_count
FROM auction_details WHERE product_id = '1'
GROUP BY bidprice
order by my_count ASC limit 1