Re: Counting two columns with where causes for each

From: Adam Hapworth <hap_at_mikomi.org>
Date: 9 Sep 2002 16:55:08 -0700
Message-ID: <a6cb04db.0209091555.7498da54_at_posting.google.com>


aeaas_at_yahoo.com (Matt Novinger) wrote in message news:<19809582.0209090733.51643fdd_at_posting.google.com>...

> I need a SQL query that will list by district and race the count of
> who has either a job of 15 or has a date for a raise
> the logical query would be
> select district, race, count(job), count(date_for_raise)
> from info

> where job = 18 OR date_for_raise IS NOT NULL

do you think this may be a problem when looking for jobs that match 15

> group by district, race;
>
> but this returns an incorrect total for job=15
Received on Tue Sep 10 2002 - 01:55:08 CEST

Original text of this message