SQL interview questions and answers | Entry level data analyst interview

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

Комментарии • 69

  • @AaronMOliver
    @AaronMOliver  2 года назад +21

    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!

    • @munir8310
      @munir8310 Год назад +2

      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'

    • @AaronMOliver
      @AaronMOliver  Год назад +1

      @@munir8310 great catch you’re right! No need to join on movie since we can just use the movie ID from the casting table

    • @philipkubiak6041
      @philipkubiak6041 7 месяцев назад

      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

  • @juugro
    @juugro Год назад +27

    I usually don't comment on RUclips videos but this was so well put together, awesome stuff thank you :)

  • @shahzainahmed6851
    @shahzainahmed6851 2 года назад +16

    so helpful and calming rather than overwhelming

  • @kristall5390
    @kristall5390 2 года назад +19

    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 😅

  • @drivetrainerYT
    @drivetrainerYT Год назад +8

    Definitely subbed. Definitely a fan now. Please do more videos in your calm and clearly structured manner. Thanks!

  • @timurnurlygayanov3208
    @timurnurlygayanov3208 3 месяца назад

    Man, this is great video, detailed, simple and covers all basic SQL patterns! Thank you!

  • @AlimamyConteh-ke1tq
    @AlimamyConteh-ke1tq Год назад +10

    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.

    • @AaronMOliver
      @AaronMOliver  Год назад +1

      Amazing! Glad it was so helpful!

    • @AlimamyConteh-ke1tq
      @AlimamyConteh-ke1tq Год назад +2

      Most definitely! I had my 2nd interview last week Monday & waiting to hear back from them by the end of this week.

    • @markvilla7796
      @markvilla7796 Год назад

      Hi! I want to know more about your initial interview.

    • @pzeid48
      @pzeid48 Год назад

      How did it go?

    • @fireinthehole2272
      @fireinthehole2272 11 месяцев назад

      @@AlimamyConteh-ke1tq DID YOU GET THE JOB?

  • @LA-sw1gv
    @LA-sw1gv 11 месяцев назад

    Thanks for sharing this. It is really helpful in showing how to think logically and work through the question.

  • @OnePercentPerfectionist
    @OnePercentPerfectionist Месяц назад

    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. :)

  • @aidanthompson5053
    @aidanthompson5053 Год назад

    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.

  • @bhuvanmohinidevi194
    @bhuvanmohinidevi194 Год назад +2

    That was so helpful! Thank you so much big brother!

  • @aidanthompson5053
    @aidanthompson5053 Год назад

    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

  • @aidanthompson5053
    @aidanthompson5053 Год назад +1

    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

  • @NathanSStorey
    @NathanSStorey 6 месяцев назад

    Thanks for the upload. Great video. Hope it helps with my interview tomorrow!

  • @kavinsuresh5468
    @kavinsuresh5468 Год назад +9

    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.

    • @AaronMOliver
      @AaronMOliver  Год назад +2

      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!

  • @aidanthompson5053
    @aidanthompson5053 Год назад

    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.

  • @jiigyj11
    @jiigyj11 Год назад

    the music was a nice touch and helped me stay focused. Keep doing what you are doing bro. thanks

  • @naamas6153
    @naamas6153 2 года назад +3

    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

  • @achilleconte4385
    @achilleconte4385 Год назад +2

    Thanks for sharing your knowledge, was really helpful. Just a quick question: is it common to alias without writing the AS statement?

    • @AaronMOliver
      @AaronMOliver  Год назад +2

      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.

    • @achilleconte4385
      @achilleconte4385 Год назад

      @@AaronMOliver got it, thanks. Have a nice one 💪

  • @ezhankhan1035
    @ezhankhan1035 10 месяцев назад

    Incredibly helpful video! Thanks Aaron :)

  • @gabiscarabel
    @gabiscarabel Год назад +1

    Amazing video! Many thanks!

  • @JongeloEntertainment
    @JongeloEntertainment 2 года назад +2

    Straight to the point and simplified... very interesting 👌 👍

  • @С.Семенчук
    @С.Семенчук Год назад +2

    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.

  • @lablondekalalizi9502
    @lablondekalalizi9502 Год назад +12

    Yooooh, I'm typing your questions in chatGPT and it giving me the same answers without event presenting it with tables. This is awesome

  • @jackma9049
    @jackma9049 Год назад

    Thanks Aaron, really good and clear tutorial!

  • @agirmaus-lh9zi
    @agirmaus-lh9zi 2 года назад +1

    Thanks so much .. great and relevant content

  • @owdengodson2990
    @owdengodson2990 4 месяца назад

    Joins can be used to combine rows from two OR MORE tables!!

  • @clarafang6398
    @clarafang6398 2 года назад +1

    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?

  • @princemontanaa9704
    @princemontanaa9704 2 года назад +2

    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

  • @sayakdas4612
    @sayakdas4612 Год назад +4

    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

    • @Zuranthus
      @Zuranthus Год назад

      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)

  • @yashgala7556
    @yashgala7556 Год назад

    Great video, thanks!

  • @立松徹
    @立松徹 11 месяцев назад

    cool video)

  • @markvilla7796
    @markvilla7796 Год назад

    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.

  • @lenkapang-ek4fe
    @lenkapang-ek4fe 28 дней назад

    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?

  • @furkansalman7108
    @furkansalman7108 4 месяца назад

    In the 4th question shouldn't it be count(movieid) since we are counting the number of movies they starred in?

  • @mikeygrey9855
    @mikeygrey9855 Год назад

    Big up yourself

  • @AnilAnvesh
    @AnilAnvesh Год назад

    Thanks for this video.

  • @ayushsrivastava9997
    @ayushsrivastava9997 8 месяцев назад

    It should be >= 10 million coz its atleast right?

  • @mynameis211
    @mynameis211 Год назад

    Lovvvvvve it make more like these

  • @smolboyi
    @smolboyi Год назад

    Thank you 🙏

  • @rajeevsarkar5315
    @rajeevsarkar5315 2 года назад

    Hey Aaron can you tell me where I can find the practice sql question except hackerrank

  • @TheStubLord
    @TheStubLord Год назад

    this is great

  • @aidanthompson5053
    @aidanthompson5053 Год назад

    SQL is a coding language used to interact with relational databases
    MySQL is a software used to implement those relational databases

  • @28lester
    @28lester 2 дня назад

    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?

    • @AaronMOliver
      @AaronMOliver  15 часов назад

      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!

  • @sunnygawande5283
    @sunnygawande5283 Год назад

    cte would be better for last question

  • @JuliaHennigan-r1m
    @JuliaHennigan-r1m Месяц назад

    Walker Kevin Garcia Eric Martin Larry

  • @Steven-up9ds
    @Steven-up9ds 2 года назад

    And there are gap's

    • @Paid2Live17
      @Paid2Live17 Год назад

      And there are illogical apostrophes on plural nouns

  • @aidanthompson5053
    @aidanthompson5053 Год назад

    18:16

  • @AzzDesignHD
    @AzzDesignHD 2 года назад +2

    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 🙂

    • @OmariEtetembaWilondja
      @OmariEtetembaWilondja Год назад +2

      Brub what, I was able to understand with that music in the background. It's not bad really

    • @Paid2Live17
      @Paid2Live17 Год назад +2

      Lmao the music is so low you can barely hear it, always someone trying to find something to complain about...

    • @ShawnFX
      @ShawnFX Год назад

      @@OmariEtetembaWilondja man called him "brub"😂

  • @funnytime7143
    @funnytime7143 7 месяцев назад

    thank you

  • @Tim4141-v7u
    @Tim4141-v7u 3 месяца назад

    thank you