Divide two values in a saved search with SQL
I created a saved search that used line items from invoices to pull line item detail. I am creating a report that groups by item pulling the Quantity billed, and then the item quantity on hand. I can pull these two values individually, however I am trying to see how mnay months of inventory we have on hand by dividing quantity on hand from the average quantity billed. I have tried a million different ways of makin the formula. Can anyone help me figure out what I am doing wrong?
The current formula is:
(the /2 is because we pulled 2 months of sales and had to find the rate of sale per month)