I have 2 dates in my table created date and resolved date, i need to count the keys created by week and resolved by week .. i can do something like this in script and use event type as indicator to filter out resolved and created , but is there any other simplified way to get this done instead of touching existing sql in the application ?