I have scenario with me. For that I need to create a query. The scenario is as follows:
When My Location And Department is equal in the file I want to Multiply Quantity Column with Cost Column and Add it.
Loc Dept Quantity Cost
1 10 10 2
1 10 10 3
1 10 11 5
2 10 10 7
For above example in the First, second and third record comes is in my scenario so I need to do a total 10*2 + 10*3 + 11*55=105
So The record looks like as follows
Loc Dept Total
1 10 105
Can anyone please share the query related to above scenario. Please let me know if require more explanation.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!