At 11:25 -0800 11/8/02, [EMAIL PROTECTED] wrote:
Hi,

Does version 2.23.52 supports the use of nested select?
There is no such version.  I assume you mean 3.23.52?  Queries
such as you show below are not supported until 4.1.

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

Reply via email to