select headline, count(*) from headlines_table group by headline; Eva Parackova [EMAIL PROTECTED]
-----Original Message----- From: Michelle de Beer [mailto:[EMAIL PROTECTED]] Sent: 3. decembra 2002 13:27 To: mysql list Subject: Select and count duplicates I have a column containing headlines. In this column there are some duplicates, like this: ----------- monsters headline1 monsters halloween monsters halloween ... ---------- How can I get a result like this instead? HEADLINE | HITS ----------------------- monsters | 3 halloween | 2 headline1 | 1 ----------------------- Any thoughts? // Michelle <Sql query> __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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