Back to questions

SQL HAVING Practice Exercise SQL Interview Question

SQL HAVING Practice Exercise

SQL Interview Question

Given a table of candidates and their technical skills, list the candidate IDs of candidates who have more than 2 technical skills.

Assumption:

  • There are no duplicates in the table.

Table:

Column NameType
candidate_idinteger
skillvarchar

Example Input:

candidate_idskill
123Python
123Tableau
123PostgreSQL
234PowerBI
234SQL Server
345Python
345Tableau

Example Output:

candidate_id
123

Example Explanation

Candidate 123 is the only ID that is outputted because they have more than two technical skills (Python, Tableau, and PostgreSQL). 234 and 345 aren't displayed, because they only have two technical skills.

Difficulty

Easy

Input

Output