I tried your query as well and it works same.
but the problem is
if the current month is january it fetches
last year december, and jan,feb,march and april of
current year..
This is part of the problem with not giving proper specs. You never
mentioned that you had data from the future in the table, nor did you
provide sample data, etc.
Anyway, I don't understand how the query could have missed data for
November, if in fact your table had data from the correct window in
November. If you want the whole month of November, you need to state that,
instead of saying "last 3 months." To me, that means today minus three
months, not this month, last month, and the month before.
And if you want to exclude data from the future, you add another WHERE
clause. So instead of just WHERE dateColumn >= someDate you add AND
dateColumn < someOtherDate.
Hopefully this answers your questions. If you want better answers, please
provide better specs. See
http://www.aspfaq.com/5006