I have a table that looks like this:
YEAR RESOLUTION_DATE CREATION_DATE 2013 2013/02/18 2012 2012/05/26 2009 2009/11/11 2013 2013/12/08 2013/12/01 2000 2000/17/31 2007 2007/12/08 2012 2012/12/08 2012 2012/03/23 2012/03/10 2012 2012/12/08 2007 2007/01/17 2012 2012/01/17 2012/01/10 2009 2009/02/14
I am trying to make a query that will output the following:
YEAR COUNT_RESOLUTION_DATE COUNT_CREATION_DATE 2000 0 1 2007 0 2 2009 0 2 2011 0 0 2012 2 5 2013 1 2
The caveat is that I would like the query to count the number of RESOLUTION_DATE by YEAR, where the RESOLUTION_DATE IS NOT NULL and i want to count ALL CREATION_DATE's. The SQL is needed for an oracle database.
count_creation_date0 for the year 2000? Shouldn't it be 1 since there is a row with ayearof 2000 (and acreation_dateof 2008-- that seems odd but I don't see why you wouldn't count it)? Why is thecount_creation_datefor 2011 23? I only see 1 row with ayearof 2011 (and that somehow has acreation_dateof 2007).