If you want to skip ahead to the coding questions they begin at 4:15! Thanks for watching, and let me know if this is helpful, I will do more example interview questions!
Thank you very much for this wonderful video, however I have one question. In question 15 why did you do join with movie table in the main query? We don't need anything from movie table. Below I did it without that join SELECT a.name FROM actor a JOIN casting c ON a.id=c.actorid WHERE c.movieid in (SELECT m.id FROM actor a JOIN casting c ON a.id=c.actorid JOIN movie m ON m.id=c.movieid WHERE a.name='Art Garfunkel') AND a.name!='Art Garfunkel'
Thanks for such a useful video, just liked and subscribed! I know this is a random question lol but I loved the background music so much, do you know if I can find it on RUclips? Thanks Aaron
Wow!!!! I just had a 1st round interview for an entry-level Data Analyst position and just received an update back from the recruiter for a 2nd round interview that I am currently preparing for. Thank you so much for this video. It really helped me to understand how to create proper SQL queries I am currently learning from DataCamp.
Thanks for this. I attempted the last one before watching your solution. I didn't need to go to the movies table since the movie ids were already on the casting table. But I really like how you explained generally. Great video. Please make more. :)
SQL is an abstraction; a language - there’s no implementation involved, just coding syntax MySQL is a piece of software, a relational database management tool that allows you to: use a graphical interface to update schemas, to define data types to give users permissions or revoke them etc.
There are 4 main types of joins: Inner, outer, left, right An inner join retrieves records that have matching values in both tables involved in the join An outer join retrieves records where there is a match in either the left or right table Left join retrieves records from the left table and the matched records from the right table Right join retrieves records from the right table and the matched records from the left table
A join us a function in SQL that allows a user to combine 2 different tables based on a set of logic and the columns from those tables that the user defines
For the interview question 2 ( 9:00 ) wouldn't it be >= instead of just > because the problem says 'at least' which is inclusive of the given number too.
Good callout! That's correct, yeah. It just so happens in this case you get the correct results anyway, but there are a lot of times that wouldn't be the case, so good catch thanks!
A primary key is a unique, non-nullable identifier for each record in a table and it can be either 1 column or multiple columns. However, each table can only have one primary key.
Hi, thanks for the video! Where do you get these questions? (I went to the SQLzoo site and couldn't find questions) I would be happy if you can send me a link! Thanks
Hey good question. It is common to alias tables without using "AS" but I don't believe you can do that for aliasing variable names in the select statement.
There are three join types - INNER, OUTER and CROSS, not four. You missed the latter one. And you missed FULL OUTER join. Also LEFT, RIGHT and FULL joins are different kinds of OUTER join.
nice video! I will have junior data analyst tech interview next week , and the interviewer said he will give me a case study and test my sql and powerBI skill, I have no idea how it could be. do you have any suggestion for data analytics case studies?
bro im trying to be an analyst and im learning pandas, sql, python, tableau, matplotlob and I think this is too much. i didnt know interviews will just ask me simple things like sql
Coding question 4 makes no sense to me. I wrote the following and got the wrong answer, and different output to your solution, even though they look identical in what they are doing? SELECT ac.name FROM actor ac JOIN casting ca ON ac.id = ca.actorid GROUP BY ac.name HAVING COUNT(CASE WHEN ca.ord = 1 THEN 1 ELSE 0 END) >= 15 It should be essentially the same, since in your solution you are counting the name, because it was already filtered to only include ord = 1 and grouped by name. In mine we grouped by name, and counting the occurences of ord=1, it should return the same value, and the same names, why doesn't it?
Good question! What your solution is doing is actually not counting occurences of ord=1, it is just counting all rows in the resulting set. Try changing the COUNT to SUM and see if that works!
The music is distracting bro, great vid but litterally if it's a education video then make it raw, you don't need to make entertaining as in putting in music. Thanks for the info tho 🙂
If you want to skip ahead to the coding questions they begin at 4:15!
Thanks for watching, and let me know if this is helpful, I will do more example interview questions!
Thank you very much for this wonderful video, however I have one question. In question 15 why did you do join with movie table in the main query? We don't need anything from movie table. Below I did it without that join
SELECT a.name
FROM actor a
JOIN casting c ON a.id=c.actorid
WHERE c.movieid in
(SELECT m.id
FROM actor a
JOIN casting c ON a.id=c.actorid
JOIN movie m ON m.id=c.movieid
WHERE a.name='Art Garfunkel')
AND a.name!='Art Garfunkel'
@@munir8310 great catch you’re right! No need to join on movie since we can just use the movie ID from the casting table
Thanks for such a useful video, just liked and subscribed! I know this is a random question lol but I loved the background music so much, do you know if I can find it on RUclips? Thanks Aaron
I usually don't comment on RUclips videos but this was so well put together, awesome stuff thank you :)
so helpful and calming rather than overwhelming
Ty! I’m applying for my first data analytics job and this help me verbalize topics that I knew but didn’t know how to say 😅
Happy to help, good luck!
Definitely subbed. Definitely a fan now. Please do more videos in your calm and clearly structured manner. Thanks!
Man, this is great video, detailed, simple and covers all basic SQL patterns! Thank you!
Wow!!!! I just had a 1st round interview for an entry-level Data Analyst position and just received an update back from the recruiter for a 2nd round interview that I am currently preparing for. Thank you so much for this video. It really helped me to understand how to create proper SQL queries I am currently learning from DataCamp.
Amazing! Glad it was so helpful!
Most definitely! I had my 2nd interview last week Monday & waiting to hear back from them by the end of this week.
Hi! I want to know more about your initial interview.
How did it go?
@@AlimamyConteh-ke1tq DID YOU GET THE JOB?
Thanks for sharing this. It is really helpful in showing how to think logically and work through the question.
Thanks for this. I attempted the last one before watching your solution. I didn't need to go to the movies table since the movie ids were already on the casting table. But I really like how you explained generally. Great video. Please make more. :)
SQL is an abstraction; a language - there’s no implementation involved, just coding syntax
MySQL is a piece of software, a relational database management tool that allows you to: use a graphical interface to update schemas, to define data types to give users permissions or revoke them etc.
That was so helpful! Thank you so much big brother!
There are 4 main types of joins:
Inner, outer, left, right
An inner join retrieves records that have matching values in both tables involved in the join
An outer join retrieves records where there is a match in either the left or right table
Left join retrieves records from the left table and the matched records from the right table
Right join retrieves records from the right table and the matched records from the left table
A join us a function in SQL that allows a user to combine 2 different tables based on a set of logic and the columns from those tables that the user defines
Thanks for the upload. Great video. Hope it helps with my interview tomorrow!
For the interview question 2 ( 9:00 ) wouldn't it be >= instead of just > because the problem says 'at least' which is inclusive of the given number too.
Good callout! That's correct, yeah. It just so happens in this case you get the correct results anyway, but there are a lot of times that wouldn't be the case, so good catch thanks!
A primary key is a unique, non-nullable identifier for each record in a table and it can be either 1 column or multiple columns. However, each table can only have one primary key.
the music was a nice touch and helped me stay focused. Keep doing what you are doing bro. thanks
Hi, thanks for the video!
Where do you get these questions? (I went to the SQLzoo site and couldn't find questions) I would be happy if you can send me a link! Thanks
Thanks for sharing your knowledge, was really helpful. Just a quick question: is it common to alias without writing the AS statement?
Hey good question. It is common to alias tables without using "AS" but I don't believe you can do that for aliasing variable names in the select statement.
@@AaronMOliver got it, thanks. Have a nice one 💪
Incredibly helpful video! Thanks Aaron :)
Amazing video! Many thanks!
Straight to the point and simplified... very interesting 👌 👍
There are three join types - INNER, OUTER and CROSS, not four. You missed the latter one. And you missed FULL OUTER join. Also LEFT, RIGHT and FULL joins are different kinds of OUTER join.
Yooooh, I'm typing your questions in chatGPT and it giving me the same answers without event presenting it with tables. This is awesome
Thanks Aaron, really good and clear tutorial!
Thanks so much .. great and relevant content
Joins can be used to combine rows from two OR MORE tables!!
nice video! I will have junior data analyst tech interview next week , and the interviewer said he will give me a case study and test my sql and powerBI skill, I have no idea how it could be. do you have any suggestion for data analytics case studies?
bro im trying to be an analyst and im learning pandas, sql, python, tableau, matplotlob and I think this is too much. i didnt know interviews will just ask me simple things like sql
sir, can you please upload a video on how to work on SQL from an excel data project. can you please show a demo project? @AaronMOliver
don't know if you have figured it out yet but you need to import the excel csv into a SQL database manager (ssms, mysql, postgre, oracle, access etc)
Great video, thanks!
cool video)
is this really the interview question? or the assessment? I'm sorry don't have an idea but want to learn. Please no bad comment. Thank you so much.
hi, the coding question5 list the people who have worked with.... may I ask you why don't we direct write" where name=...." not sub query?
In the 4th question shouldn't it be count(movieid) since we are counting the number of movies they starred in?
Big up yourself
Thanks for this video.
It should be >= 10 million coz its atleast right?
Lovvvvvve it make more like these
Thank you 🙏
Hey Aaron can you tell me where I can find the practice sql question except hackerrank
this is great
SQL is a coding language used to interact with relational databases
MySQL is a software used to implement those relational databases
Coding question 4 makes no sense to me. I wrote the following and got the wrong answer, and different output to your solution, even though they look identical in what they are doing?
SELECT ac.name
FROM actor ac
JOIN casting ca ON ac.id = ca.actorid
GROUP BY ac.name
HAVING COUNT(CASE WHEN ca.ord = 1 THEN 1 ELSE 0 END) >= 15
It should be essentially the same, since in your solution you are counting the name, because it was already filtered to only include ord = 1 and grouped by name. In mine we grouped by name, and counting the occurences of ord=1, it should return the same value, and the same names, why doesn't it?
Good question! What your solution is doing is actually not counting occurences of ord=1, it is just counting all rows in the resulting set. Try changing the COUNT to SUM and see if that works!
cte would be better for last question
Walker Kevin Garcia Eric Martin Larry
And there are gap's
And there are illogical apostrophes on plural nouns
18:16
The music is distracting bro, great vid but litterally if it's a education video then make it raw, you don't need to make entertaining as in putting in music. Thanks for the info tho 🙂
Brub what, I was able to understand with that music in the background. It's not bad really
Lmao the music is so low you can barely hear it, always someone trying to find something to complain about...
@@OmariEtetembaWilondja man called him "brub"😂
thank you
thank you