Exercise: Update Above Average
Mark top performers.
Solution
sql
1UPDATE students SET top_performer = 1
2WHERE marks > (SELECT AVG(marks) FROM students);
Mark top performers.
1UPDATE students SET top_performer = 1
2WHERE marks > (SELECT AVG(marks) FROM students);