Question: how to calculate percentage in ms sql?
Answer: SQL Percent To Total The subquery SELECT SUM(Sales) FROM Total_Sales calculates the sum. We can then divide the individual values by this sum to obtain the percent to total for each row.