SELECT student, department, count(*) as 'count'
FROM students
GROUP BY student, department
HAVING count > 1
+------------+------------+-------+
| student | department | count |
+------------+------------+-------+
| 1234567890 | CS | 2 |
+------------+------------+-------+