Another challenge for SQL lovers!
"Write a SQL query to retrieve a list of all students who have at least one occurrence of a backlog item. The results should be in the format: `student.name`. The data is stored in two tables: `student` and `backlog`. The `student` table has columns: `Name`, `Type`, and `Description`. The `backlog` table also has columns: `Name`, `Type`, and `Description`. Each student listed must have at least one record in the `backlog` table. Sample output: `Alex`, `Chris`."
A possible solution:
SELECT DISTINCT s.Name AS student_name
FROM student s
WHERE EXISTS (
SELECT 1
FROM backlog b
WHERE b.Name = s.Name
AND b.Type = s.Type
AND b.Description = s.Description
);
Please feel free to contribute if you'd like to combine the two tables or propose alternative solutions. 🙂


