Counting Multiple Occurences in Same Table Grouped by Date
Hello,
I am stuck on this one. I have a table that has many transactions. I would like to write a SQL that shows for a given date range, how many rows were added and how many were distinctly updated. In my table I have 2 timestamp columns that I am trying to count on:
DATE_CREATED
LAST_UPDATE_DATE
I would like my report to look something like. I don't care if the updated column includes the rows created but I do care if there are no rows created and would like to set the value to 0.
Date Number Rows Created Number of Rows Updated
12/01/2013 10 15
12/02/2013 0 10
12/03/2013 30 36
12/04/2013 50 70
...
I cannot figure this out. I know it's a combination of CASE statements and am hoping to get it done with regular SQL
I transform the timestamp with TO_CHAR to MM/DD/YYYY then group by. I have no problem getting one or the other with separate queries, but not both in the same table.
Thank you!
-Brent