* Almar van Pel <snip> > mysql> select uren.uur, > -> count(messages.msg_date_time) > -> from uren left join messages > -> on hour(messages.msg_date_time) = uren.uur where messages.user_id = > 'almar' group by uren.uur > -> ;
I'm not sure it will solve your problem, but try this: select uren.uur, count(messages.msg_date_time) from uren left join messages on hour(messages.msg_date_time) = uren.uur and messages.user_id = 'almar' group by uren.uur -- Roger query --------------------------------------------------------------------- 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