चेतावनी:क्वेरी अधिकतम COUNT
. वाले डुप्लिकेट रिकॉर्ड को हैंडल नहीं करेगी
SELECT commodity, COUNT(commodity) `count`
FROM orders
GROUP BY commodity
ORDER BY `count` DESC
LIMIT 1
लेकिन यह होगा,
SELECT commodity, COUNT(commodity) `count`
FROM orders
GROUP BY commodity
HAVING COUNT(commodity) =
(
SELECT MAX(`COUNT`)
FROM
(
SELECT COUNT(commodity) `count`
FROM orders
GROUP BY commodity
) s
)