Skip
Arish's avatar

204. Practice - UNION 2


Exercise: With Conditions

Combine high-scoring and low-scoring students.

Solution

sql
1SELECT name, 'High' AS type FROM students WHERE marks > 80
2UNION
3SELECT name, 'Low' AS type FROM students WHERE marks < 50;