Combining multiple queries to get the result |
Hi,
I want to do some calculations but no success , how to convert this in simple and working query, most important variable is $sale_cost. What I would like to achieve is $sale_cost, I am also selecting $sale_cost in another query Is there any shortcut to do all calculation in few working queries Any help is very appreciated
To streamline your workflow, consider using a CTE (Common Table Expression) or a temporary table to calculate sale_cost once and reuse it across multiple queries. For example:
Code: WITH sales_calculation AS ( |
Welcome Guest, Not a member yet? Register Sign In |