Hi, Does version 2.23.52 supports the use of nested select?
I want to write a query based on a group where I do a count of something for each group. In SQL Server 7 it would look something like this, select a.department ,(select count(*) from empdb where gender='m' and department=a.department) as male ,(select count(*) from empdb where gender='f' and department=a.department) as female from empdb a group by department Thanks, Eladio --------------------------------------------------------------------- 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