SELECT name, SUM(score) as total_score
FROM students
GROUP BY name
SELECT
name,
SUM(CASE WHEN subject='Math' THEN score ELSE 0 END) as math_score,
SUM(CASE WHEN subject='English' THEN score ELSE 0 END) as english_score
FROM students
GROUP BY name
SELECT name, SUM(score) as total_score
FROM students
GROUP BY name
ORDER BY total_score DESC
SELECT name, SUM(score) as total_score
FROM students
GROUP BY name
HAVING total_score > 200
SELECT name, score, SUM(score) OVER (PARTITION BY name) as total_score
FROM students