Advanced SQL Tutorial | Subqueries

  Рет қаралды 364,875

Alex The Analyst

Alex The Analyst

Күн бұрын

Take my Full MySQL Course Here: bit.ly/3tqOipr
In today's Advanced SQL lesson we walk through how to use Subqueries.
Link to Code: github.com/AlexTheAnalyst/SQL...
____________________________________________
SUBSCRIBE!
Do you want to become a Data Analyst? That's what this channel is all about! My goal is to help you learn everything you need in order to start your career or even switch your career into Data Analytics. Be sure to subscribe to not miss out on any content!
____________________________________________
RESOURCES:
Coursera Courses:
Google Data Analyst Certification: coursera.pxf.io/5bBd62
Data Analysis with Python - coursera.pxf.io/BXY3Wy
IBM Data Analysis Specialization - coursera.pxf.io/AoYOdR
Tableau Data Visualization - coursera.pxf.io/MXYqaN
Udemy Courses:
Python for Data Analysis and Visualization- bit.ly/3hhX4LX
Statistics for Data Science - bit.ly/37jqDbq
SQL for Data Analysts (SSMS) - bit.ly/3fkqEij
Tableau A-Z - bit.ly/385lYvN
Please note I may earn a small commission for any purchase through these links - Thanks for supporting the channel!
____________________________________________
SUPPORT MY CHANNEL - PATREON/MERCH
Patreon Page - / alextheanalyst
Alex The Analyst Shop - teespring.com/stores/alex-the...
____________________________________________
Websites:
GitHub: github.com/AlexTheAnalyst
____________________________________________
All opinions or statements in this video are my own and do not reflect the opinion of the company I work for or have ever worked for

Пікірлер: 215
@adityapandey6969
@adityapandey6969 11 ай бұрын
The entire, Beginner, Intermediate, and Advanced playlists are a gold mine, Alex! Thank You!!!
@AlexTheAnalyst
@AlexTheAnalyst 11 ай бұрын
Glad you like them!
@_stalKer___
@_stalKer___ 6 ай бұрын
where is advance sql playlist
@usuallyclueless4477
@usuallyclueless4477 3 жыл бұрын
I have a Coursera certificate in MySQL, but you've explained it so much better than the instructor of that course.
@ericfiumano4694
@ericfiumano4694 2 жыл бұрын
I cannot speak for MySQL course cause I haven't attended it but, having attended other technical Coursera (and Google, too) Courses I fet a little bit disappointed regarding the content. Definitively, too much bla bla bla and little practical approach.
@wasitthat
@wasitthat 2 жыл бұрын
I'm taking that course right now. Have to heavily supplement it with the mode tutorial because the actual course lacks soooo much detail and examples!
@tasadem20
@tasadem20 2 жыл бұрын
Same. Taking a 4 week class from Coursera and i was stuck on week 3 where the instuctor teaches subquiries and joins. Hope this video will help
@ninas.2724
@ninas.2724 2 жыл бұрын
@@tasadem20 I’m having the same problem in week 3, I couldn’t understand the instructor and she didn’t not explain correctly
@HortenseEagle
@HortenseEagle Жыл бұрын
I have the same issue on datacamp, before I realised I was already doing nested subqueries and CTEs 💀
@halildurmaz7827
@halildurmaz7827 Жыл бұрын
Perfectly clear explanation. However, I also noticed wrong information: 7:17 You said, "In your Subquery, you can only have 1 column selected". However, you can select multiple columns by using parentheses --------> WHERE (a, b) IN (SELECT a, b FROM x)
@damasusaditama2148
@damasusaditama2148 2 жыл бұрын
All your SQL tutorial videos from the basic up to this have helped me understand SQL, MUCH BETTER compared to the explanation that I've got from a bootcamp. Your explanation is so complete and concise. Thank you so much, Alex!
@AlexTheAnalyst
@AlexTheAnalyst 2 жыл бұрын
Really glad to hear it! :D
@alexter001122
@alexter001122 Жыл бұрын
Question: were you able to land an analyst job after finishing your bootcamp?
@damasusaditama2148
@damasusaditama2148 Жыл бұрын
@@alexter001122 yes. I finished my bootcamp in Sep-2021, then applied for a data analyst position at various startups, did some interviews, and started working as a data analyst in Feb-2022.
@loose.electricity
@loose.electricity Жыл бұрын
Just finished this series, thank you so much, you've re-ignited my passion for learning again. These simple, clear explanations of concepts has given me the confidence to dive back into more advanced concepts again.
@flyeagle320
@flyeagle320 Жыл бұрын
I Am glad I followed the whole series of SQL tutorials from easy to advanced. Now I am clear on the concept. Now I am going to follow a real-world project of yours.
@marcellaperkes4870
@marcellaperkes4870 2 жыл бұрын
Thank you Alex! 🙌 For the last year I’ve been learning about data analysis/computer science part time, with the goal to move into the tech industry so that I can WFH, be available to my kids, and have income growth potential. Your videos were fundamental to my learning. I just landed my first job in the industry, and I attribute a big part of that to you.
@IceTobSmoKeo
@IceTobSmoKeo Жыл бұрын
How was your journey now? Mind sharing us your experience?
@ninahbae2922
@ninahbae2922 Жыл бұрын
Today i have completed SQL😩😩🥰❤️ Am so grateful for having found your channel, i believe by 2024 i will land a data analyst role in government or health care all studying from this bootcamp from scratch🙏🙏🙏 never been as committed, thank you so much once again, tomorrow am starting off with Python
@ngunyi101
@ngunyi101 Жыл бұрын
wish you all the best in your journey. consistency is key 💪
@mizerosamuel5613
@mizerosamuel5613 3 ай бұрын
How is it now????
@melissaleigh3013
@melissaleigh3013 Жыл бұрын
King, you are the best sql teacher on youtube. Thanks SO much for making content on sql concepts that are actually used in everyday work flows.
@charlesrobertson1860
@charlesrobertson1860 Жыл бұрын
Thanks so much for these tutorials! I had a basic understanding of queries in ArcMap for GIS data and didn't understand why it was really that important but now thinking of it as having a database that has pre-made queries that can be manipulated in different ways to process and analyze data has made me understand its importance!
@AlijandroI
@AlijandroI Жыл бұрын
Had troubles understanding some concepts from a bootcamp but your explanations are amazing! Concise, precise and easy to understand.Thank you!
@ThiagoSimoes79
@ThiagoSimoes79 10 ай бұрын
I thought I knew SQL, but this whole series of videos help me understand that I don't know anything. Although your explanation was ease to follow and understand, I feel that need more study to really understand all the concepts.Thanks a lot for your time to make this series.
@jjsinclair94
@jjsinclair94 3 жыл бұрын
This has come just in time for an interview I have in the morning for a modelling analyst position, can't begin to describe how much your videos have helped! Keep up the crazy good work you are doing here!
@nnaemekaonwuka7474
@nnaemekaonwuka7474 3 жыл бұрын
best of luck and i hope you celebrate with us when you get it. cheers
@rosslobo2692
@rosslobo2692 2 жыл бұрын
did you get that job ?
@davidcorona644
@davidcorona644 10 ай бұрын
Holy mackerel! We think and code exactly the same.This is exactly how I teach people about sub-queries, and partition by, and even the rarely used 'right join' which is similar to 'not in' where clause sub-query.
@ColonelHathi
@ColonelHathi 5 ай бұрын
I just finished the Beginner, Intermediate, and Advanced SQL videos. Thank you, Alex, for publishing these. I'm adding SQL to my tool belt. These were a fantastic first look at the language.
@stultuses
@stultuses Жыл бұрын
Excellent, someone who knows how to zoom in for those watching on mobile!!!!
@AnglBunny
@AnglBunny Жыл бұрын
Thank you so much for posting this series. I am learning SQL for the first time and your videos are extremely helpful :)
@matheuspegorari1094
@matheuspegorari1094 3 жыл бұрын
I love your videos, content is never enough. I know sometimes may be obvious to talk about something like subqueries when we have lots of content in the internet, but your explanation is very pertinent and very didatic, i learned a lot today. For this I thank you.
@AlexTheAnalyst
@AlexTheAnalyst 3 жыл бұрын
So glad to hear that! And I agree - sometimes one good explanation of something is all you need to really get the grasp of it
@esthernwaogu592
@esthernwaogu592 Жыл бұрын
Hello matheus please can we chat on telegram I need assistance
@yanirhaim7787
@yanirhaim7787 2 жыл бұрын
Thanks for the great tutorial! Currently on my Google Data Analytics Certificate! This video made it easier to understand the concept!
@salikmalik7631
@salikmalik7631 3 жыл бұрын
Your videos are good Alex. We need a playlist of SQL needed for data science. Its a request. :)
@ekinci_io
@ekinci_io 4 ай бұрын
As someone who received SQL training during master's degree, I have to say that I learned much more from Alex's SQL lessons than what I learned at school. You are amazing Alex!
@linavilaa
@linavilaa 2 жыл бұрын
I learned so much with your videos. You made learning SQL very fun. I enjoyed your examples. Thank you!
@tomilolaomowumi7156
@tomilolaomowumi7156 Жыл бұрын
You posted a tutorial on CTE before this. I am following from the older videos to the newer ones so I got lost for a bit and had to come find this. Thank you for making learning easy
@ImEli2215
@ImEli2215 Жыл бұрын
After roaming around with other tutorials, it makes your tutorial more valued. Thanks sir
@yingdeng1106
@yingdeng1106 Жыл бұрын
Thank you so much Alex! I went through the basic, intermediate and advanced SQL Tutorials. I would love to learn more about the store procedures in detail!
@AlexTheAnalyst
@AlexTheAnalyst Жыл бұрын
You're most welcome! Thanks for learning with me :)
@ezhankhan1035
@ezhankhan1035 6 ай бұрын
Brilliant SQL Tutorial Series! Every Video has really helped to fill in any potential gaps in my knowledge and even reinforce my existing skills. Thanks Alex!
@ivorkoruznjakk1579
@ivorkoruznjakk1579 Жыл бұрын
Im taking a test today and this is the perfect video for a quick reminder of everything.
@richardogden1466
@richardogden1466 Жыл бұрын
Thank you for your work and detailed explanations Alex. I mainly use COGNOS and COGNOS SQL so this is a great crash course for me to learn the differences between the two.
@akj3388
@akj3388 2 жыл бұрын
Thanks for letting us know that for a subquery in the SELECT and WHERE clauses; it can only have a single value and single column respectively as an output.
@icantw8
@icantw8 2 жыл бұрын
This is tremendously helpful. Got to resolve a blocker because of you. Thanks!
@user-fr9gv8vk9t
@user-fr9gv8vk9t Жыл бұрын
Thanks Alex for teaching Advance SQL REALLY QUICK.
@louisizuchi1626
@louisizuchi1626 Жыл бұрын
Thank you Alex, i really learnt a lot from the beginners series up this advance series
@gianniprocida3332
@gianniprocida3332 2 жыл бұрын
Very helpful. All your videos about SQL are very easy to grasp and concise. Thank you so much.
@syaoransakura8839
@syaoransakura8839 2 жыл бұрын
Finally finish this advanced tutorial. Keep going for next series...
@lefamokgatle2489
@lefamokgatle2489 Жыл бұрын
Thank you so much. I had trouble understanding sub-queries. You've explained it so well. 😎
@Alexdasilva872
@Alexdasilva872 11 ай бұрын
I've just finished this series (1 week). I'm going to rewatch it all again (hopefully 1 day) and then start the Portfolio Project. I started from 0 and your videos are purely useful content, it made me understand SQL really fast. Thanks from Spain. PD: I will communicate here when I finish the course completly and also if I am lucky enough to get a job.
@srijanrawat4014
@srijanrawat4014 11 ай бұрын
do tell
@mizerosamuel5613
@mizerosamuel5613 3 ай бұрын
How is it now?
@Alexdasilva872
@Alexdasilva872 3 ай бұрын
@@mizerosamuel5613 I got a job. :) This really helped me!
@Alexdasilva872
@Alexdasilva872 3 ай бұрын
@@mizerosamuel5613i got one bro
@JohnRussell9
@JohnRussell9 Жыл бұрын
Thanks for giving such a clear and concise explanation for why one would use subqueries! I'm currently working through the Google Data Analyst certification program and your explanation and approach was much easier to understand than the instructor who presented on this very topic.
@thesamshekhawat9500
@thesamshekhawat9500 Жыл бұрын
Thank you so much Alex for providing such a valuable skills for free. It really made me become a aspiring data analyst.
@bryanpaulcardinoza7693
@bryanpaulcardinoza7693 Жыл бұрын
Just finished watching all sql tutorial videos in this bootcamp. Time to watch the portfolio project.
@momohtimothy6898
@momohtimothy6898 4 ай бұрын
I am Finally done with SQL on this amazing channel. But got to go back for some revisions.
@itsReshad
@itsReshad 2 жыл бұрын
Keep up the Amazing content Alex!
@sols9019
@sols9019 3 ай бұрын
Done for SQL Tutorial after 3 weeks of learning and spending 2-3 hours in each session while creating different scenarios outside the samples. hehe Mygee! I made it! haha! Thank you Alex! Next step is to get a certificate of SQL before proceeding to the other Tools. Hopefully I'm doing it right. Lol
@JustinLietz
@JustinLietz 2 ай бұрын
Thank you for sharing, really really appreciate this. I would love to see more advanced stuff, specifically examples where you're using synonyms across different servers within source stored procedures (used to populate stage tables) to make joins along with ctes. I am at an internship right now, and still in my first year of college, I feel completely lost when working in these health insurance databases, most videos on youtube don't really go into more complicated stuff that I work with everyday so thank you again Many of these queries in the code base are 3000+ lines long and my brain goes numb looking at all the subqueries, joins, and obscure functions I have no idea what they do
@1689JeffChavez
@1689JeffChavez Жыл бұрын
On my journey through the boot camp... This comes in handy. Thank you.
@salehgamal1511
@salehgamal1511 2 жыл бұрын
I have taken udacity course on sql and i applied the course on an actual db but your tutorials are much better realy specially on the joins
@jayashukla4799
@jayashukla4799 2 жыл бұрын
WOAHH!!!😍😍 Thank you so much for making it easy :)
@michaeloyetunde8974
@michaeloyetunde8974 10 ай бұрын
Thank you so much, Alex. Your videos are superb.
@pramudyadika_
@pramudyadika_ Жыл бұрын
thank you Alex!
@shappirefishing1186
@shappirefishing1186 8 ай бұрын
Excellent Tutorial
@anthonynkem
@anthonynkem Жыл бұрын
Thanks Alex. Great course
@itikalaneelu9126
@itikalaneelu9126 Жыл бұрын
keep up the good work sir. I have been following your videos and techtfq videos as well and learned so much
@cmhanft
@cmhanft 2 жыл бұрын
God bless you, Mr. SQL.
@MrXRes
@MrXRes Жыл бұрын
You just basically saved my career now
@StephanieBassil
@StephanieBassil 2 жыл бұрын
Thank you Alex for ur way in simplifying the training! Are you giving later more advanced videos about SQL or that is all ?
@syedalinemath917
@syedalinemath917 10 ай бұрын
Thanks it was helpful!
@romanvasiura6705
@romanvasiura6705 Жыл бұрын
Thank you for this video and recommendation
@DeepakBhargav-or8rs
@DeepakBhargav-or8rs 2 ай бұрын
thank you so much for this tutorial
@marius9897
@marius9897 Жыл бұрын
Hi Alex. Thank you very much for this series of videos. For me, your method of teaching is easy to follow and understand. Are perhaps you going to produce a tutorial on Goolge's Looker too in the near future?
@mfundohg958
@mfundohg958 2 жыл бұрын
Thank you this series is really helpful. 👌
@iskate248
@iskate248 2 жыл бұрын
Sounds like Dane Cook is teaching me SQL. Good video, thank you.
@fantasytrain42
@fantasytrain42 8 ай бұрын
I have enjoyed your videos. I have been programming and working as a dba for a long time, 28 years - since sql server 4.2. (Do you remember *=). I would consider myself an expert in sql server. I was even able to pick up a couple things in your sql videos that I didn’t know or at least did 8n a different way. Great job. Looking forward to the python and newer content. Working towards learning how to use ML to help clean data and find errors over the next year.
@user-ok9vq1rh6h
@user-ok9vq1rh6h 10 ай бұрын
Hey Alex! All your videos on Sql Tutorials are awesome! Can you make a video on how to use primary and foreign keys in Sql Server? You've mentioned in one of your videos that you'll be covering those topics but I haven't come across the PK and FK in the Sql Tutorials(maybe I've missed them). Or if you have a video already out, could you direct me to it? Thanks for all the videos, they've helped me understand SQL Server much better!
@Charlay_Charlay
@Charlay_Charlay 10 ай бұрын
Thanks Alex!
@AZZOUZE1
@AZZOUZE1 11 ай бұрын
Great content Thanks
@dawitworku821
@dawitworku821 2 ай бұрын
Very helpful. Than you.
@jonathanbrotto7278
@jonathanbrotto7278 2 жыл бұрын
I wish I had this during my undergrad over a decade ago.
@smgt90
@smgt90 2 жыл бұрын
Thanks, very helpful
@stylewithsmriti
@stylewithsmriti 2 жыл бұрын
Please make a video on Window Functions. I love your videos :)
@queensam6868
@queensam6868 Жыл бұрын
Great content
@SeanBaker
@SeanBaker 3 жыл бұрын
I’ve been using SQL on my job since 2007, and I swear that I still don’t know everything I should know when it comes to really "complicated" queries.
@AlexTheAnalyst
@AlexTheAnalyst 3 жыл бұрын
Same lol
@lorajohnson4115
@lorajohnson4115 3 жыл бұрын
Me too.
@esthernwaogu592
@esthernwaogu592 Жыл бұрын
Hello Alex I love ur videos they v been guiding me through data analysis but i v issues with my sql
@tausifahmed4760
@tausifahmed4760 3 жыл бұрын
Hey Alex thanks for making videos which are so informative and helpful..as a mechanical engineer who wants to change his profession to data analyst ..what will u suggest to learn first
@YoYo-gf9wb
@YoYo-gf9wb 2 жыл бұрын
You should remind ppl to like your videos. I really like all your videos, super helpful~~~ but always forget to like it....
@kristinaannabel7113
@kristinaannabel7113 9 ай бұрын
that was really quick
@66abady
@66abady 2 жыл бұрын
thanks a lot mate
@Joi_SS
@Joi_SS 3 жыл бұрын
I just learned this recently! Wonder do you have any recommendation for an intermediate level courses after the beginner course? I'm 75% done with my SQL beginner course. Thanks! :)
@pipertripp
@pipertripp 6 ай бұрын
This looks like a really interesting subject. I didn’t know anything about it until now, but I suspect the exponential, geometric, and weibull distributions might factor in?
@A7mouzi
@A7mouzi 22 күн бұрын
do you have any suggestions on where I could practice these functions more? and this playlist is really beneficial thanks for the time and effort!
@BestInTheWorld215
@BestInTheWorld215 2 жыл бұрын
I'd love a tutorial for working with SSIS Packages
@asfak54321
@asfak54321 2 жыл бұрын
Thanks
@rickydethan7037
@rickydethan7037 9 ай бұрын
I just finished the SQL tutorial from beginner to advanced. Now I want to start the portofolio project but part 2 & 4 of that video are missing. Let me know when those video already uploaded. thank you very much and sorry if there's something wrong about this comment, I'm still learning English
@kelthekonqrr
@kelthekonqrr Жыл бұрын
SubQueries, I keep coming back here
@Jl777100
@Jl777100 9 ай бұрын
Still confusing AF, but I think I will get there at some point. Thanks!
@davekoot7880
@davekoot7880 Жыл бұрын
Thanks for the video! Studying SQL with DataCamp but the explanation on subqueries is very short..
@RodStremel
@RodStremel 3 жыл бұрын
Your content is awesome, Alex! Thanks for all the videos! I don't know if you've answered this before, but I need to ask: how can I show my SQL skills in a portfolio project? Showing Python code with all the EDA and data viz is ok, I can do it, but I always have a hard time figuring out how to show employers that I know SQL (it seems like all they care about is if I've used in a job situation, which I haven't had the chance to). Any tips on that? Thanks again!
@Magmatic91
@Magmatic91 3 жыл бұрын
It's a good question. I'm kind of in the same situation than you. Personally, what I'm trying to do is simply looking for datasets online then trying to make my own project. You can for example find free datasets in SQL server website or Kaggle but I agree with you that it's not that simple. Hopefully Alex will answer this comment.
@jpzhang8290
@jpzhang8290 Жыл бұрын
Subquery can also alternatively be replaced by temp table or CTE.
@Anipro88
@Anipro88 2 жыл бұрын
Very helpful, thank you. Is there a way to find out the input parameters of a stored procedure, that someone else may have created, w/o using the "modify" option?
11 ай бұрын
Hi Alex! I'm following you in LinkedIn. Pls, keep me post it about the data analyst bootcamp you plan to launch. I, myself I am changing career. I want to be more technical marketer with strong focus on web analytics and touching here and there analytics subjects....
@janetbartonjo8916
@janetbartonjo8916 2 жыл бұрын
Hey,i love your videos! I have a question though. In your last example you can simply do the normal query and filter using "WHERE Age>30" and still get the same results, right? If yes,then why do we need to use WHERE sub query?
@psd5967
@psd5967 3 жыл бұрын
Great video!! thanks!
@slimisslow244
@slimisslow244 2 жыл бұрын
Hi there! great content!! Just to know, in a working place, how often is a subquery used compared to the join function? As both can give the same result.
@AlexTheAnalyst
@AlexTheAnalyst 2 жыл бұрын
Joins are used all the time - subqueries about 10% as many times as joins
@samuelraj5613
@samuelraj5613 Жыл бұрын
Done
@mwarsell
@mwarsell 2 жыл бұрын
Really quick
@user-eu5rz4nv3y
@user-eu5rz4nv3y Жыл бұрын
hello Alex and thanks for greate videos. What "over ()" means? thanks
@massimoriggio6297
@massimoriggio6297 2 жыл бұрын
Hello Alex, why did you create the subquery when to get the average you could have just specified : "SELECT EmployeeID, Salary, (AVG)salary FROM EmployeeSalary"? I am really confused and would be glad if you could help.
@gonzaloenrique8741
@gonzaloenrique8741 11 ай бұрын
Take a shot everytime you hear " really quickly" and try to survive
@claraoliva254
@claraoliva254 7 ай бұрын
Just to clarify, only the where statement combined with the subquery can only have 1 column selected? SELECT and FROM can select all columns if wanted from a subquery? thanks!
@ishantjain1
@ishantjain1 3 жыл бұрын
​ @Alex The Analyst Hey alex can you explain the functions CUME_DIST(),FIRST_VALUE,LAST_VALUE,RANK,DENSE_RANK,LAG,LEAD,NTILE etc (window functions)
@nishantm1924
@nishantm1924 3 жыл бұрын
how can you import csv file to an already existing table using sql query? like suppose you have Customer table and now you want to add data from xyz.csv file and both Customer and csv file have same attribute ,then how to do such task?
@robinchriqui2407
@robinchriqui2407 3 жыл бұрын
Hi Alex thank you for your work great tutorial. Today I had a test in SQL for a company it was so hard. Do you know a good platform to train myself with exercice ? I mess this interview but I really would to do better next tile
@AlexTheAnalyst
@AlexTheAnalyst 3 жыл бұрын
Try Leetcode or Stratascratch - both are good options
@fabio336ful
@fabio336ful 3 жыл бұрын
You can use HackerRank too. Its free
Advanced SQL Tutorial | String Functions + Use Cases
13:49
Alex The Analyst
Рет қаралды 173 М.
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Anton Putra
Рет қаралды 118 М.
Nutella bro sis family Challenge 😋
00:31
Mr. Clabik
Рет қаралды 13 МЛН
Did you believe it was real? #tiktok
00:25
Анастасия Тарасова
Рет қаралды 55 МЛН
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 125 МЛН
Expert Level SQL Tutorial
23:27
James Oliver
Рет қаралды 152 М.
How to do Subqueries in SQL with Examples
8:20
Becoming a Data Scientist
Рет қаралды 165 М.
SQL Beginner to Advanced in One Hour | CareerFoundry Webinar
1:08:28
Alex The Analyst
Рет қаралды 207 М.
Advanced SQL Tutorial | Temp Tables
10:19
Alex The Analyst
Рет қаралды 247 М.
When to Use a Subquery in SQL
8:50
Database Star
Рет қаралды 31 М.
Learn how to write SQL Queries(Practice Complex SQL Queries)
49:56