logo

Back to questions

Data Science Skills

Easy

Given a table of candidates and their skills, you're tasked with finding the candidates best suited for an open Data Science job. You want to find candidates who are proficient in Python, Tableau, and PostgreSQL.

Write a SQL query to list the candidates who possess all of the required skills for the job. Sort the the output by candidate ID in ascending order.

Assumption:

  • There are no duplicates in the candidates table.

Table:

Column NameType
candidate_idinteger
skillvarchar

Example Input:

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

Example Output:

candidate_id
123

Explanation

Candidate 123 is displayed because they have Python, Tableau, and PostgreSQL skills. 345 isn't included in the output because they're missing one of the required skills: PostgreSQL.

PostgreSQL 14

Refer friends to get bonus content & cool prizes.