Weighted count is more correct indeed. WHAT I HAVE What I did before was generating for every date range (status_start_date to status_end_date) all the in between lying months. For the first line (of my example above) it results in Status_start_date Status_end_date Status ID Month 01JAN2001 17DEC2001 one 0001 01JAN2001 01JAN2001 17DEC2001 one 0001 01FEB2001 .. 01JAN2001 17DEC2001 one 0001 01DEC2001 Based on this table, I did a distinct count on ID by month and status. WHAT I WANT the previous isn't sufficient, because DEC2001 is counted as a complete month for status=one and ID=0001, while that status was only active for the first 17 days of DEC2001. I want to account for that problem..
... View more