|
|
Question : A Simple formula for percentage.
|
|
I feel really silly asking this question.
What is the formula for percentage? If I have a total of 1251 and sold 47 what is the percentage of tickets sold.
Thank you for not laughing too hard.
|
Answer : A Simple formula for percentage.
|
|
You need to multiply 24 by 100 and then divide by 1251 (or divide and then multiply, doesn't matter).
For example:
SELECT CAST((CAST(47 AS DECIMAL(5, 2)) * 100) / 1251 AS DECIMAL(5, 1))
|
|
|
|
|