Hi!! You can try select format_date(field2, '%m %d %Y)as timestamp, count(*), field1 from mad group by field1 all the best, Jayasimhan A
----- Original Message ----- From: cristian ditoiu <[EMAIL PROTECTED]> To: mysql <[EMAIL PROTECTED]> Sent: Friday, March 22, 2002 1:20 PM Subject: group by timestamp field > > I have MySql database containing a table mad by several fields among wich : > > Field1 (varchar) , Field 2 (timestamp) . > I want to do : > select count(*) , field1 , group by field1 . > That's ok , but i'd like to get results like : > 2002-01-01 3 > 2002-01-02 4 > ..... > How can i do that considering the timestamp field which stores date like > (20020314184748) , thus > containg the hour , second , etc ? > > Thank you > > > --------------------------------------------------------------------- > 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