Re: [QUESTION] SQL*Plus: Joins

From: Terry Brandt <tbrandt_at_netins.net>
Date: 1996/10/11
Message-ID: <325E6393.2EB3_at_netins.net>#1/1


Frampton Steve R wrote:
>
> Hello:
>
> What is the proper way of doing something like this:
>
> select count(a.employee_id) male, count(b.employee_id) female
> from employee_table a, employee_table b
> where a.gender = 'M'
> and b.gender = 'F';
>
> The statement as above return huge values that do not represent
> actual counts. If the statement is broken up into two select
> statements, the correct numbers are returned.
>
> What exactly am I doing wrong? :-(
>
> Thanks...
>
> ---------------< LINUX: The choice of a GNU generation.

>---------------

> Steve Frampton http://qlink.queensu.ca/~3srf
> Work: <frampton_at_mail.flarc.edu.on.ca> School: <3srf_at_qlink.queensu.ca>
> --< NOTICE! I do not accept unsolicited commercial e-mail messages!
>--select count(*), gender from employee_table group by gender;   Received on Fri Oct 11 1996 - 00:00:00 CEST

Original text of this message