Re: Counting two columns with where causes for each
From: John Keller <john_w_keller_at_yahoo.com>
Date: 17 Sep 2002 15:49:44 -0700
Message-ID: <12c0a6d6.0209171449.7b641693_at_posting.google.com>
Date: 17 Sep 2002 15:49:44 -0700
Message-ID: <12c0a6d6.0209171449.7b641693_at_posting.google.com>
That's good; I didn't think of using decode + sum in lieu of count.
Charlie3101_at_hotmail.com (Charlie Edwards) wrote in message news:<db479d88.0209170521.1e02e76e_at_posting.google.com>...
>
> Am I misunderstanding something here?
> Whats wrong with (assuming it's job 15 you want, not 18) ...
>
> SELECT district,
> race,
> SUM(DECODE(job,15,1,0)) jobcount,
> COUNT(date_for_raise) datecount
> FROM info
> GROUP BY district,race;
>
> CE
Received on Wed Sep 18 2002 - 00:49:44 CEST