Hi! select count(*), model from tbl group by model; On 04-Oct-2001 Osman Omar wrote: > Hi, > > I have a table like this > > model color > ----------------- > 135 blue > 135 red > 135 green > 235 black > 235 green > ---------------- > > How do I get how many row in each distinct model > eg > > model 135 have 3 color > model 235 have 2 color > > thanks. > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
-- Ruben Muradyan System Administrator/Security Manager PanARMENIAN Network +--------------------------------------------------+ |Software is like sex: it's better, when it's free.| +--------------------------------------------------+ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php