Student Backlogs

Company: Amazon Senior business research scientist_14april

Difficulty: medium

Problem Statement

Student Backlogs You are given two tables, student and backlog . In the Amazon Student Internship Program, students may have backlogs in certain internship training modules. Write an SQL query that returns the name of every student who has at least one backlog item , sorted by name in ascending order. Table: student Column Data Type Description ID INTEGER Unique id of the student, primary key NAME VARCHAR(50) Name of the student (two students may have the same name) Table: backlog Column Data Type Description STUDENT_ID INTEGER Student who has the backlog, a foreign key into student.ID SUBJECT_ID VARCHAR(20) Module of the backlog Expected Output Return one column: Column Description NAME Name of a student who has at least one backlog item Rules A student qualifies when at least one backlog row has STUDENT_ID equal to the student's ID . One backlog item is enough. Each qualifying student appears exactly once, no matter how many backlog rows they have (a student can have several backlogs