Pls send me ...
I take it you want to limit the load in your script?
Do you have a date field?
Do you take the current month as part of the six months, even though it's not complete?
Give us a bit more info so we can help you out.
May try like this:
// Sum Last six months Sales
Hope this helps,
Retrieving data ...