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.
If you only want the non-NULL resolution dates counted, this should work: