DEV Community

Cover image for SQL ๐Ÿ“Š challenge_1โš”๏ธ
Mahmoud EL-kariouny
Mahmoud EL-kariouny

Posted on • Edited on

SQL ๐Ÿ“Š challenge_1โš”๏ธ

Data Science Skills LinkedIn SQL Interview Question

  • 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 query to list the candidates who possess all of the required skills for the job.
  • Sort the output by candidate ID in ascending order.

โš ๏ธNote:

  • You have to visit the task URL to fully understand what the task needs if you want to add a solution or test your solution.
Task URL: Link

My Solution:

SELECT 
    candidate_id
FROM 
    candidates 
WHERE
    skill IN ('Python', 'Tableau', 'PostgreSQL')
GROUP BY 
    candidate_id
HAVING
    COUNT(skill) = 3;
Enter fullscreen mode Exit fullscreen mode

Code Snapshot:

Image description

Learn SQL ๐Ÿ“Š

SQL ๐Ÿ”ฅ Get Expertise in SQL with These Top Free Courses๐Ÿ’ฏ๐Ÿ†

๐ŸŽฅ

Connect with Me ๐Ÿ˜Š

๐Ÿ”— Links

linkedin

twitter

Top comments (0)