update getBudgetVsCostQuery function