MAX(COUNT(*))?
From: Clairwil <clairwil_at_hotmail.com>
Date: Thu, 30 Jan 2003 17:49:34 GMT
Message-ID: <OAd_9.63989$YG2.1793074_at_twister1.libero.it>
From the table
Date: Thu, 30 Jan 2003 17:49:34 GMT
Message-ID: <OAd_9.63989$YG2.1793074_at_twister1.libero.it>
From the table
Computer (IdComputer, model, IdDealer, DealerAddress)
I need to find which dealer has sold most computers; I can count how many computers they have sold each one, I can order them, but I can't find only the bestseller, the maximum value in COUNT(*) column!!
SELECT IdDealer, COUNT(*) FROM Computer
ORDER BY IdDealer, desc;
GROUP BY IdDealer
Can someone help me? Received on Thu Jan 30 2003 - 18:49:34 CET