Skills Match

ASKED IN INTERVIEW
4pts
Linked In

Problem Statement

LinkedIn wants to improve its job recommendation engine. A candidate is considered a strong match for a job if they possess at least 80% of the skills listed in the job requirements.

Write an SQL query to find all pairs of candidates and jobs where the candidate meets this 80% threshold.

Rules:

  • A candidate must possess at least 80% of the specific skills required for a job.
  • Only include jobs that have at least one skill requirement.
  • Output columns: candidate_id, job_id.
  • Order the result by candidate_id in ascending order, then by job_id in ascending order.

Table Schema:

  • Candidates: Table containing unique candidate metadata.
  • Candidate_Skills: Table listing skills possessed by each candidate.
  • Job_Requirements: Table listing skills required for each job posting.
Tests your understanding of
Joins, Aggregation, Filtering and Division

Input Tables

Candidates
candidate_id(INTEGER)name(VARCHAR)
1Alice
2Bob
3Charlie
4David
5Eve
6Frank
Candidate_Skills
candidate_id(INTEGER)skill_name(VARCHAR)
1SQL
1Python
1Tableau
1Java
2SQL
2Python
3SQL
4Java
4Python
Job_Requirements
job_id(INTEGER)skill_name(VARCHAR)
101SQL
101Python
101Java
101Tableau
101Excel
102SQL
102Python

Expected Output

candidate_id(INTEGER)job_id(INTEGER)
1101
1102
2102

Tags

MediumASKED IN INTERVIEWJoinsAggregationFilteringDivision
15-20 min
48%

Hints