Getting total sales by service
I have the tables orderListing and orders:
I want a function that returns:
I have unit costs and amount of each service in order listing but I want total sold for each service. I am stuck getting the sum of cost*amount for each serviceID. As there can be many orderListings with the same serviceID and since there is a multiplication it is too tricky.
I would also like to select by orderStatus and by submissionTime but that I should be able to figure out easily
0 Replies