Q:

Create a column that is the average of three other columns in a table -SQL

My database contains a table that contains 3 grades, say: 
grade_1, grade_2 and grade_3 

I want to add another row in my table which contains the average of this three grades:
ALTER TABLE grades
ADD COLUMN ... ??? 

Thank you.

A:

You can do it with this:
alter table grades
add column average int as ((grade_1 + grade_2 + grade_3) / 3);

See the demo.

