SQL Interview Questions – Accepted Candidates From the Interviews

Spread the love

Problem Description –

Write an SQL query to report the IDs of the candidates who have at least two years of experience and the sum of the score of their interview rounds is strictly greater than 15.

Return the result table in any order.

The query result format is in the following example.

Problem Link – Accepted Candidates

Difficulty Level – Medium

Solution –

SELECT CANDIDATE_ID FROM CANDIDATES WHERE
YEARS_OF_EXP >= 2
AND INTERVIEW_ID IN
(SELECT INTERVIEW_ID FROM ROUNDS
GROUP BY INTERVIEW_ID HAVING SUM(SCORE) > 15);

Rating: 1 out of 5.

Leave a Reply