Question: how to calculate percentages sql?
Answer: In that case, we could write the following SQL query to calculate, in SQL, the percentage of marks scored: SELECT (sum(marks_subject)*100)/1000 AS percentage_marks FROM STUDENT_MARKS WHERE student_name = 'X'; SELECT. (sum(marks_subject)*100)/1000 AS percentage_marks.