I have a history table that has account statuses month over month. Two of the fields look like this:
PROC_DT - Date Field - Example: 1/31/2012, 2/29/2012, etc...
The same ACCOUNT_NUMBER can show up in each month. How can I write an efficient query that shows me a list of "new" ACCOUNT_NUMBERS per month. New would be defined by an ACCOUNT_NUMBER showing up for the first time in February's month for example. So I'm looking for a query that will give me the output below. I'm looking for a single query (or the shortest query possible) where I can type a date range for 6 months for example. I'm trying to avoid running a query six times by typing in a single month six different times.