Learn SQL for Data Analysis in one hour (with sample dataset + 50 queries)

Sdílet
Vložit
  • čas přidán 4. 07. 2024
  • SQL is one of the most important skills to have for data people. In this comprehensive video, learn how to use SQL to perform common data analysis tasks. You will learn:
    ◈ How to use SELECT statement to answer business questions
    ◈ Working with WHERE clause
    ◈ Using AND, OR, NOT and combining them to create complex queries.
    ◈ Sorting query results using ORDER BY
    ◈ Combining data from two or more tables using JOINS
    ◈ Creating reports with GROUP BY
    ◈ More than 50 example queries, tips and ideas
    🚨 PRE-REQUISITES:
    You need any SQL console (I am using the FREE MySQL Community Edition and you can download it from dev.mysql.com/downloads/insta... )
    You also need the Awesome Chocolates Dataset.
    See chandoo.org/wp/learn-sql-for-... for the sample files, instructions on data import and other SQL resources for you.
    😃 Basic intro:
    If you want a simple introduction to SQL (for an interview or to brush up), see this video instead - • SQL Basics for people ...
    ⏱ IN THE VIDEO:
    0:00 - Introduction
    0:43 - Data setup, explanation & basic queries
    6:24 - Adding calculated columns in SELECT
    8:39 - Our first WHERE clause
    10:28 - Ordering query results with ORDER BY
    13:24 - More Where clause examples
    16:42 - Between conditions
    19:06 - Working with Dates
    21:50 - Using other tables
    23:47 - IN clause
    24:36 - Pattern matching in SQL
    26:30 - CASE operator and branching logic
    30:30 - JOINS
    36:32 - LEFT Join vs. RIGHT Join ~ EXPLAINED
    38:28 - More Join examples
    42:10 - Adding conditions to Joins
    47:30 - GROUP BY and creating reports with SQL
    54:50 - Showing Top 10 Products by Amount
    57:12 - Closing remarks & next steps for you
    📚 RESOURCES TO LEARN MORE SQL:
    1) Practice the problems and scenarios discussed in the video with the awesome chocolates dataset.
    2) Solve homework problems listed here - chandoo.org/wp/learn-sql-for-...
    3) Get one or two SQL books. My recommendations are here - chandoo.org/wp/learn-sql-for-...
    4) Consider going for an SQL course. Check the same page for my course suggestions.
    5) PRACTICE, PRACTICE, PRACTICE!
    🙄SQL ALTERNATIVES:
    If you don't want to learn SQL but still wish to work with data, then consider learning POWER QUERY, which offers similar capabilities as SQL.
    See this video 👉 • Power Query Tutorial -...
    😎WATCH NEXT:
    Now that you know a bit of SQL, why not use it with Power BI to do visual data analysis?
    If you are new to Power BI, see my Power BI video to get started with that.
    👇
    • Beginner to PRO Data A...
    ~
    😍FOLLLOW ME
    Apart from CZcams, I regularly share content on below places. Feel free to check them out and give a follow.
    💻 WEBSITE - chandoo.org/wp/
    📃 WEEKLY DATA TIPS NEWSLETTER - chandoo.org/wp/subscribe/
    📷 INSTAGRAM - / chandoo.xlsx
    🐤 TWITTER - / r1c1
    ~
    Select "good day" from days
    where person = "you" 😃
    #sql #tutorial
  • Věda a technologie

Komentáře • 801

  • @pgkannan
    @pgkannan Před rokem +168

    Thanks!

    • @chandoo_
      @chandoo_  Před rokem +22

      Thanks Kannan for the super and love 😍

    • @Bhoomi-ux4hv
      @Bhoomi-ux4hv Před rokem +4

      Hi bro...can i get the information of Oracle SQL with installation n practising.....as I want to try for the job which it is useful for my career..can u pls suggest me

  • @christianowusu9764
    @christianowusu9764 Před rokem +50

    I have watched several videos on SQL and have never understood the concept of it until I came across this video. This was well explained in the simplest way possible. You are an exceptional instructor. Thanks for the help.

  • @tipumusicstudio
    @tipumusicstudio Před 5 měsíci +18

    Most Productive 60 mins I have spent on CZcams. Great to the point video.

  • @BKSDA1
    @BKSDA1 Před rokem +11

    Fantastic video! I cannot stress enough how much these types of videos help. Thank you man for taking the time to explain all these basic SQL concepts. LEGEND!

  • @mattbilliot7627
    @mattbilliot7627 Před 7 měsíci +8

    This is by far the best tutorial on SQL that I have seen. I've taken a few SQL courses and was getting confused towards the middle of the course, but this short and straight to the point showed me a lot. I would love to see you make a full tutorial on this subject from beginner to advanced level. Thank you for doing this video on SQL and I look forward to watching and learning more from you. Have a great day!

  • @carolinateran5851
    @carolinateran5851 Před rokem +7

    Muy claro video! Muchas Gracias...Me encantó esta parte:
    Select "good day" from days
    where person = "you" 😃

  • @hazeldoshi8442
    @hazeldoshi8442 Před rokem +31

    Hi. It was a great class. Can I request you to have a Masterclass for SQL covering everything from basics to advance? That will be very very helpful.

  • @nimraali7145
    @nimraali7145 Před rokem +17

    This is my favorite SQL tutorial on youtube. Thanks for making it so easy to understand. Looking forward to more SQL tutorial from your end!

  • @AltafAnsari-tf9nl
    @AltafAnsari-tf9nl Před 10 měsíci +8

    I had gone through many videos on youtube for SQL but this one tops them all . Simple,easy and hands-on. Great Work !!!

  • @alfonsobarreiro3777
    @alfonsobarreiro3777 Před rokem +3

    Thank you, Chandoo! This is a great video to understand the basics of SQL. I've also been watching your Excel videos.

  • @ushakirandhoke7352
    @ushakirandhoke7352 Před rokem +5

    I saw various videos on SQL but this one is the best. No confusions everything is up to the mark thank you for sharing it 😊👏

  • @SnowFaceChamcham
    @SnowFaceChamcham Před rokem +8

    Not that you need the same thing repeated to you again, but this was insanely helpful. I'm thinking I may be studying to be a data analyst soon but I didn't want to make a huge financial commitment without knowing how the tools worked and this was exactly what I needed to know that I'll love learning all I can about it

    • @HYP3WOLF
      @HYP3WOLF Před rokem

      there is little financial commitment just take courses online through coursera and earn a certificate through there for data and sql

  • @daviddiazsanchez7292
    @daviddiazsanchez7292 Před rokem +2

    Thank you Chandoo! You are my favorite teacher and Data Analyst instructor. I love all of your videos and contents.. many many thanks

  • @charlessosu638
    @charlessosu638 Před 5 měsíci +1

    words can't quantify how much of a lifesaver you are. keep doing what you do best

  • @vijayarjunwadkar
    @vijayarjunwadkar Před rokem +18

    Thanks Chandoo for this awesome SQL video! I know SQL and regularly using Oracle and SQL Server, but now you have helped me understand usage of MySQL as well, and it's a value addition for sure! 🙂

  • @buddhahat
    @buddhahat Před rokem +49

    Chandoo, this is a spectacularly helpful video mate, thank you so much. I will absolutely be sharing this video with colleagues. What you have managed to demonstrate in less than one hour is a lot more than some instructors on paid sites manage to achieve in hours. You've really outdone yourself. I am just about to start a new role which will require this skill, so your upload is perfectly timed. Thank you very much!

    • @chandoo_
      @chandoo_  Před rokem +15

      Wow.. thanks Buddhahat. I first learned SQL in '96-97 and have used it for first 6 years of my professional life. Then fast forward a decade or two, now I am back on SQL again. I am glad you loved this :)

    • @Unknown-ng8me
      @Unknown-ng8me Před rokem

      ​@@chandoo_
      Plz make video on window function and cte

    • @priyavarshanrg700
      @priyavarshanrg700 Před 8 měsíci

      @@chandoo_ Bro i face this type of error "0 7 18:38:12 use awesome chocolates Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'chocolates' at line 1 0.000 sec" what can i do

  • @prathyupa
    @prathyupa Před rokem +2

    This is a great effort for people who wanted to understand SQL. Thankyou Chandoo!!!!!

  • @niggszo
    @niggszo Před rokem

    Thanks a lot, Chandoo! Your discourses are always so clear and concise. So appreciative to you for helping people.

  • @martinjob2246
    @martinjob2246 Před 5 měsíci +1

    This is the best SQL tutorial so far on internet

  • @nimraali7145
    @nimraali7145 Před rokem

    Genuinely excited to practice SQL with this video!

  • @raquelheleno4676
    @raquelheleno4676 Před rokem +1

    I'm so grateful for this video Chandoo and for your time spent making then. You helped me a lot. The best SQL video ever!

  • @nareshsaplabs
    @nareshsaplabs Před rokem +6

    Thanks a lot Chandoo for this video. This is exactly what I was looking for - to the point, crisp n clear with that too with practicals which is cherry on top... Thanks again :)

  • @salahderdar5148
    @salahderdar5148 Před rokem +1

    The best tutorial I've ever seen about SQL, Thank you Chandoo,
    We will be very grateful if you could make an advanced tutorial treating a real data analytic project using SQL
    Thank you a very much Chandoo

  • @guillermoag7722
    @guillermoag7722 Před rokem +1

    @Chandoo. I loved this tutorial. You have a way to explain difficult concepts and make them seem very easy. Thank you!!!

  • @sparklingtravellers
    @sparklingtravellers Před rokem +10

    Your video and my learning path are quite similar.. I first learn and become a pro in Excel but was in dilemma to learn SQL and power BI .. this video is a perfect guide and valuable material for both... You are absolutely awesome 😎😎

  • @ambikareddy21
    @ambikareddy21 Před rokem +11

    Hi sir i have just started to change my career path to data analytics and after going through various platforms i came across your videos and they are so amazing, thankyou for putting things in such a beautiful way, happy student 😃

    • @ShailendraKumar-hx5mq
      @ShailendraKumar-hx5mq Před rokem

      same here

    • @donkey8206
      @donkey8206 Před 8 měsíci

      Is the data analyst carrier has good scope, r more jobs available out side ,I am in a plan to switch over from KPO Medical billing sector to Data analyst
      Pls share ur experience

  • @mohammedshabaaz9625
    @mohammedshabaaz9625 Před rokem +28

    Thank you so much Chandoo for this video. Can clearly see how much of effort you put into making these videos with full end to end information with resources and homeworks for better understanding.
    Your videos are becoming an addiction to me😅❤️ Glad to have found this channel.
    God bless You

    • @manveersingh8627
      @manveersingh8627 Před rokem

      +1

    • @sarfrazakhtar9887
      @sarfrazakhtar9887 Před rokem

      You watched his videos after having any course? I'm new and I'm not getting anything what i need to start with basics ?

  • @nilufarnosirjonova1399
    @nilufarnosirjonova1399 Před 11 měsíci +1

    The class was very clear and easy to follow. Thank you!

  • @jiayili437
    @jiayili437 Před 11 měsíci

    Amazing no-fuss video for SQL beginners, thank you!

  • @suprasannakarsabankar222

    Thank you chandoo. It is very useful for beginners to become expert in SQL. You are my god of career. I really follows all your videos. 🙏🙏

  • @Tiaggus
    @Tiaggus Před rokem

    Thanks. This tutorial is so helpful. In my case, I'm in the middle of a career transition to Data Analytics. So, thank you again.

  • @flyeagle320
    @flyeagle320 Před rokem +33

    Thank you Chandoo sir , for making SQL look simple with your video . I am so confident to learn more by practicing the same .

    • @chandoo_
      @chandoo_  Před rokem +3

      Thanks FlyEagle for the love and SUPER 😍

  • @aminenidmhan9654
    @aminenidmhan9654 Před 4 měsíci

    Mister Chandoo, i just reviewed sql in 1 hour with this course, many thanks to you my friend

  • @KulwinderKaur-kd3bk
    @KulwinderKaur-kd3bk Před rokem +1

    This is so far the BEST SQL video , along with real time practice that I have come across. A big thanks to you sir. Sir please make a video on the how to use LinkedIn for applying job as a data analyst.

  • @harinimeenakshi7321
    @harinimeenakshi7321 Před rokem +1

    The most honest channel that I have found on CZcams. Thank you so much for the data sets😃

  • @phoenixkomben-ie9xq
    @phoenixkomben-ie9xq Před 2 měsíci +5

    Even college professors can't explain like this guy🎉

  • @shivampal6058
    @shivampal6058 Před rokem +1

    Great work Sir, The clarity of concept you have is just outstanding.

  • @HananelGez
    @HananelGez Před 11 měsíci

    Finally SQL makes sense!!!!!!!!!! Thank you so much!!!!!!

  • @cwnmaster
    @cwnmaster Před 10 měsíci

    Could you please provide next level of SQL starting from HAVING clause? I love the way you explain. I also love your your humour and your native tone.

  • @kavyasree9885
    @kavyasree9885 Před rokem

    Thanks Chandoo!
    I could able to revise my basics with this video.

  • @abigail9457
    @abigail9457 Před rokem +3

    What perfect timing Sir! Was struggling with sql and this came up.....Thank you so much👍🏻🤩

    • @chandoo_
      @chandoo_  Před rokem +5

      I guess I "SELECT"ed the right time to publish it then 😃

  • @mashoodahmed8734
    @mashoodahmed8734 Před rokem +3

    So much covered in just one video. Extremely helpful and amazing 🔥

    • @sarfrazakhtar9887
      @sarfrazakhtar9887 Před rokem

      What you studied it before? Because I'm not getting anything

  • @agkalyan
    @agkalyan Před rokem

    Sir are greatest mentor in youtube.
    Who like to share your knowledge to needy people and thanks give clarity on each concept.
    Wishing to reach sooner 1 million subscribers 🙏 ❤️ 🙌 💙 ♥️ 💕

  • @sarimhussain6095
    @sarimhussain6095 Před 3 měsíci

    My man, this was one hell of a video. Thanks !

  • @luckyfin4572
    @luckyfin4572 Před rokem +1

    Nice effort, Chandoo. Very helpful especially for beginners ❤

  • @ogunsanyamayowa3736
    @ogunsanyamayowa3736 Před rokem +1

    I love this content so much better than several contents on the internet talking about SQL

  • @HaileysHomes-ix5yu
    @HaileysHomes-ix5yu Před dnem

    Your videos are always straight to the point, interesting and highly educative. Thank you so much.

  • @anishshipping7200
    @anishshipping7200 Před 4 měsíci

    Such a crisp and up to the point content.. being Non IT guy, I am able to grasp it. Thanks bro for making this. Regards Anish

  • @myarchitecturallife4643
    @myarchitecturallife4643 Před rokem +2

    thank you it was really helpfull, i was actually getting confused when i was trying to analyse data with sql, nbut now my all doubts are solved thank you again!!!!!!!!!!!

  • @christopherk7920
    @christopherk7920 Před rokem +2

    I am studying Google's certified DA course and this is very useful prep ! Thank you bro 🙏

  • @yankoshuan6225
    @yankoshuan6225 Před rokem

    Chandoo , i ve been a fan since i learned excel from your videos. thank you for your time in producing such a high quality video. hope u doing amazing . wish u the best

  • @rumekegbe2
    @rumekegbe2 Před rokem +5

    All I can say is I love your work Chandoo. You are the best at what you do. ❤️

  • @laxshmikanthboya2835
    @laxshmikanthboya2835 Před rokem

    Absolutely nice way of Explanation Chandoo Anna, for Beginners like us it's more useful and informative

  • @ritaashz3107
    @ritaashz3107 Před 5 měsíci

    Such a appropriate tutorial for all types of learners. Thanks man!!

  • @MVETDivyaTA
    @MVETDivyaTA Před rokem +1

    It was very fun and learnt a lot in very easy way couldn't stop myself from watching during 'joins' session.Thanks

  • @sourabhsharma5275
    @sourabhsharma5275 Před rokem

    the best thing is you have shared the same data set. Thanks alottttt chandoo sir

  • @manishaprasad9146
    @manishaprasad9146 Před rokem

    Thank you for your informative and articulate videos. Since discovering them, I have been consistently drawn to watch more. Highly informative!! Recommend 10/10

    • @chandoo_
      @chandoo_  Před rokem +1

      Welcome aboard Manisha. :)

  • @enzocaroli
    @enzocaroli Před 11 měsíci

    Amazing video! Thank you so much, Chandoo!

  • @MrEocran
    @MrEocran Před rokem

    I started this yesterday and I am really glad I found your video.

  • @iqraazhar11
    @iqraazhar11 Před rokem

    Really helpful in revising SQL concepts . Much appreciated 👏

  • @justinedema6266
    @justinedema6266 Před rokem

    Thanks Chandoo! You made it look so easy...

  • @emilisayev6279
    @emilisayev6279 Před 8 měsíci +1

    Thank you so much for your hard work and for explaining everything very clearly.

  • @ninokereselidze5848
    @ninokereselidze5848 Před 18 dny +1

    This information helped me in a job interview, thank you!

  • @simonoganga9535
    @simonoganga9535 Před rokem

    Amazing tutor, making hard concepts easy and flow effortlessly like water

  • @agraligarhian8045
    @agraligarhian8045 Před rokem +72

    Much needed video man!!! 😂 Was sitting for placements this week.

    • @rahulminhas572
      @rahulminhas572 Před rokem

      Which college are you from?

    • @agraligarhian8045
      @agraligarhian8045 Před rokem +1

      @@rahulminhas572 Bundelkhand Institute of engineering and technology, Jhansi, Uttar Pradesh

    • @rahulminhas572
      @rahulminhas572 Před rokem

      @@agraligarhian8045 ohh
      Are you sitting for internships or placement?

    • @agraligarhian8045
      @agraligarhian8045 Před rokem +1

      @@rahulminhas572 both

    • @rahulminhas572
      @rahulminhas572 Před rokem

      @@agraligarhian8045 are you in 4th year or 3rd year?

  • @giorgimodebadze1869
    @giorgimodebadze1869 Před rokem

    I am starting learning SQL and sure this video tutorial will be very helpful for me 🎯

  • @xoichien9927
    @xoichien9927 Před rokem +1

    Great video. Looking forward to the part 2

  • @goodviber4136
    @goodviber4136 Před rokem

    Best Video in this SQL journal !!!

  • @MamunRashid-er8yz
    @MamunRashid-er8yz Před rokem +1

    Thank you so much Chandu. This video is just awesome for SQL learner with practice. Your work is super

  • @newday8074
    @newday8074 Před rokem

    Thank you very much. May Allah rewards you. It's the first that i could understand sql clearly

  • @tjguruguru4525
    @tjguruguru4525 Před rokem +4

    Hi chandoo sir I am new to your channel but I saw your video really great ☺️ kindly upload full course of python in data analytics ....🙏🏻🤝

  • @srknikhil1
    @srknikhil1 Před měsícem

    Hi Chandoo, eagerly looking forward to you coming up with another SQL sessions covering Intermediate & Advanced SQL concepts.

  • @Justcallmerita
    @Justcallmerita Před rokem +83

    Thank you for sharing your knowledge with the 🌏!

    • @chandoo_
      @chandoo_  Před rokem +9

      Wow. Thanks Rita for the love and super 😍

  • @rajendralamsal
    @rajendralamsal Před rokem

    you are the real Master Chandoo!

  • @evilpapa6013
    @evilpapa6013 Před rokem

    Thank you for all these videos.
    It is a great help to us who are just looking into Data Analytics

    • @chandoo_
      @chandoo_  Před rokem

      Good luck with your learning and career EP :)

  • @layzaduco5546
    @layzaduco5546 Před rokem +1

    Thank you Chandoo, it was my first time on SQL but I have some knowledge on excel, it is really helpful specially to those starter people like me 😍 Got big understanding on SQL, Again thank you!

  • @wgalloPT
    @wgalloPT Před 6 měsíci +1

    This IIS GOLD !!!!!! THANK YOU SO MUCH FRIEND!!!

  • @ImrulKabir-hb3lq
    @ImrulKabir-hb3lq Před rokem

    The ultimate teacher = Mr. Chandoo. I love you Sir. You are making my everyday of learning. May Allah bless you in all sense.

  • @deepakprajapati6959
    @deepakprajapati6959 Před rokem

    basic and awesome tutorial...... for data analysis using SQL recommend to start with this video ... who's ever wants to learn sql.

  • @omharne1386
    @omharne1386 Před rokem +1

    It was a great class. Thank you so much Chandoo for this video

  • @RatikantWallapure
    @RatikantWallapure Před rokem

    Thank you for sharing great SQL knowledge😊🙏.

  • @ragragrec1
    @ragragrec1 Před rokem

    Excited !!!

  • @swetha_
    @swetha_ Před rokem

    thank you !! Please do a series on complex sql queries ( advanced) , subqueries etc ...

  • @PoojaGupta-om1pv
    @PoojaGupta-om1pv Před rokem +4

    Thank you so much sir for putting so much effort 😊 also one of the best SQL video available on youtube

  • @asif_786
    @asif_786 Před rokem +1

    That is what I'm looking for. Thanks, chandoo sir from my bottom of my heart
    love from India

  • @thejourney4154
    @thejourney4154 Před rokem +1

    I just fall in love with you the way you deliver the knowledge...
    Just amazing.
    My youtube searching just stuck at your channel.

    • @chandoo_
      @chandoo_  Před rokem

      So nice of you TJ. 😍😍😍

  • @akshaykadam7992
    @akshaykadam7992 Před rokem +2

    You are the best gift youtube gave us... Thank you so much 😊

  • @arjunkrishnakj507
    @arjunkrishnakj507 Před 9 měsíci

    Big shoutout to you..Chandoo sir..all the aspects are crisp and clear. This is cool❤🎉

  • @manojnaik4645
    @manojnaik4645 Před rokem

    Awesome video chandoo thank you for all the knowledge in the simplest way.....🙂

  • @saswatkumar2517
    @saswatkumar2517 Před rokem +1

    best video on sql i have watched on youtube

  • @engribrahimrizwan4294
    @engribrahimrizwan4294 Před 16 dny

    One of the finest Data teacher on Internet ❤

  • @theshadowofclouds
    @theshadowofclouds Před 6 měsíci +1

    this is pretty boss, man. thank you kindly for the upload

  • @Pravishrajan
    @Pravishrajan Před rokem

    I have been checking your channel from past few weeks and wanting to learn SQL, although was dissapointed that I didn't get an appropriate video from your channel for SQL. Just in couple of days you uploaded this video. Thanks a lot bro. :)

  • @vinodchand1987
    @vinodchand1987 Před rokem

    Thanks for teaching in a simple way

  • @sharathchandra4812
    @sharathchandra4812 Před rokem +6

    Hey Chandoo,
    @chandoo In MySQL, the weekday() function returns the day of the week as an integer value, where Sunday is 0 and Saturday is 6. Therefore, to get the data for Friday, which is the fifth day of the week, you would need to filter the results based on weekday(saledate) = 5.
    This is what I observed while going through your class..

    • @Obito847
      @Obito847 Před rokem +1

      No, it starts with Monday for 0.
      0 = Monday, 1 = Tuesday, 2 = Wednesday, 3 = Thursday, 4 = Friday, 5 = Saturday, 6 = Sunday.
      Correct me if am wrong... Thank you

  • @chrism9037
    @chrism9037 Před rokem +1

    Epic video, thanks Chandoo!

  • @MotivateTwentyFourSeven
    @MotivateTwentyFourSeven Před 3 měsíci

    Sir you are doing great job. I have never seen SQL video like this before. What a great explanation...

  • @pankajprajapat4792
    @pankajprajapat4792 Před rokem

    Thanks Chandoo, you did great work.

  • @Jamesmichael312
    @Jamesmichael312 Před rokem

    Thanks a ton. Very well explained.🙏

  • @ahmedhelal920
    @ahmedhelal920 Před 10 měsíci

    Thanks for this good training , awesome , i am using SQL as a data analyst and i make refresh with these awesome queries with a cup of tea .