This is easy level question, the solution should be easier too why to use CTE and String_AGG SELECT candidate_id FROM candidates WHERE skill IN ('Python', 'Tableau', 'PostgreSQL') GROUP BY candidate_id HAVING COUNT(skill) = 3 ORDER BY candidate_id;
@yashnikhare2210 Жыл бұрын
with data1 as ( select *,(case when skill in ('Python','Tableau','PostgreSQL') then 1 else 0 end )as flag from candidates ) select candidate_id from data1 group by candidate_id having sum(flag)=3
@SigmaSid98 Жыл бұрын
It's working 👍🏻👍🏻👍🏻
@yunoasta2679 Жыл бұрын
Nicely done .bro ..looking forward to more content in SQL prep
@EverydayDataScience Жыл бұрын
Videos will keep coming 😊
@learningminds77417 ай бұрын
This query might not work if candidate have skills - Postgresql, PowerBI, Python, Tableau
@sravankumar1767 Жыл бұрын
Superb explanation
@rishav144 Жыл бұрын
great explanation
@emekaonyejizu8861 Жыл бұрын
Very detailed explanation. I was thinking you usually put the schema for the table especially for your leetcode SQL. I don't see that again. Please I will like to practice most of these questions creating the tables in my PostgreSQL
@EverydayDataScience Жыл бұрын
So leetcode SQL question have schema for every question and therefore I was able to put that. However, in DataLemur there is no schema present with the question. For the free questions, alternative you can SELECT * FROM Table and then practice further. If they’ll add the schema later on, I’ll put it up with the questions.
@emekaonyejizu8861 Жыл бұрын
@@EverydayDataScience Thank you for your response. I really don't see the schema for your leetcode SQL again. I was thinking it use to be in the description but when I look there I don't see it