Counting lines in case statement in SQL
I am trying to get the lines count(entered) for Today, Month to date, year to date in one sql statement. but I am not sure why it is giving me the same values for all the the three.
here is my sql statement.

select BU,
count(CASE when a.date_added = trunc(sysdate) then (part) else '0' end) as TodayQuotes,
count(CASE when a.date_added > last_day(add_months(sysdate,-1)) then (part) else '0' end) as MTDQuotesValue,
COUNT(case when to_number(to_char(a.date_added,'yyyy'))='2011' then (part) else '0' end) as YTDRegularValue
from articles
group by BU;


any help will be appreciated
Counting lines in case statement in SQL
===

I am trying to get the lines count(entered) for Today, Month to date, year to date in one sql statement. but I am not sure why it is giving me the same values for all the the three.
here is my sql statement.

select BU,
count(CASE when a.date_added = trunc(sysdate) then (part) else '0' end) as TodayQuotes,
count(CASE when a.date_added > last_day(add_months(sysdate,-1)) then (part) else '0' end) as MTDQuotesValue,
COUNT(case when to_number(to_char(a.date_added,'yyyy'))='2011' then (part) else '0' end) as YTDRegularValue
from articles
group by BU;


any help will be appreciated