need to rewrite the query adding following formula in the attached procedure
(Total bid price- sum of total costs -total base freight)/sum of total costs *100
Total bid price= sum (QI.QuoteItemQuantity * QI.QuoteItem_ItemTotalPric
e ) from the select statement.
how to implement this in the attached stored proc
I need to build the reports based on this