Sorry, two errors, should be ...
...) OR m.repyear IS NULL
GROUP BY c.year
PB
-
Chris Fonnesbeck wrote:
On 2/17/06, Peter Brawley <[EMAIL PROTECTED]> wrote:
Chris,
Your WHERE clause is weeding out the NULL joined entries. Try something
like...
select
m.repyear as repyear,
In the last episode (Feb 17), Chris Fonnesbeck said:
> I am trying to figure out how to get a comprehensive count of rows in
> a database by year. Unfortunately, when there are no rows for a
> particular year, the year is omitted from the result set, rather than
> showing up with a zero count:
>
>
Chris,
Your WHERE clause is weeding out the NULL joined entries. Try something
like...
select
m.repyear as repyear,
count(*) as count
from years y
left join mortality m on y.year=m.repyear
where (
m.region like 'Southwest'
and m.repyear>1985
and m.dthcode!=4
and (m.cause like '%red tide%' or m
I am trying to figure out how to get a comprehensive count of rows in
a database by year. Unfortunately, when there are no rows for a
particular year, the year is omitted from the result set, rather than
showing up with a zero count:
mysql> select count(*) as count, repyear from mortality where re