Тёмный

Nested Queries | SQL | Tutorial 18 

Giraffe Academy
Подписаться 305 тыс.
Просмотров 176 тыс.
50% 1

🦒❤️ www.giraffeacademy.com/databa...

Опубликовано:

 

21 дек 2017

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 152   
@benweber3388
@benweber3388 4 года назад
Writing the queries separately and then combining them made the logic of nested queries much easier to understand. Nice vid!
@AD-do2rs
@AD-do2rs 2 года назад
Indeed .
@descobra5462
@descobra5462 5 месяцев назад
This guys way of teaching is amazing
@marcusg5665
@marcusg5665 4 года назад
I feel Jim and Dwight sell more than Michael at any given time. Great video!
@isisdominguez4776
@isisdominguez4776 2 года назад
OMG, I was struggling with Nested subqueries, but now I certainly have a better insight about it. Thank you so much and the person who shared your video in a forum.
@DannyMontealegre22
@DannyMontealegre22 5 лет назад
Couldn’t figure out my problem.. watched this video.. then solved my problem in less than 2 mins. Thx dude!
@nesreen1978
@nesreen1978 4 года назад
I feel I should be contributing to your channel of how beneficial it is to me, thank you, Mike!
@TheRealAK786
@TheRealAK786 3 года назад
Came for nested queries, stayed for the dataset. Love it thanks
@Pen_Da
@Pen_Da 5 месяцев назад
This made me understand the concept of nested queries better and quicker. The approach you conveyed within 5 mins is effective. Thank you so much
@anthonyover
@anthonyover 4 года назад
YES!!!! Thank you. This was really clear. Taking my first database class via Zoom, needing all the help I can get lol!
@beizhou1614
@beizhou1614 Год назад
Thank you! Your explanation is so clear!
@sviatoslavslivinskiy9330
@sviatoslavslivinskiy9330 3 года назад
Such a great tutorial. Thanks, man!
@SunshineFromWithin
@SunshineFromWithin 2 года назад
Fantastic videos, all of them. Thank you for doing this.
@alex-sd
@alex-sd 2 года назад
Awesome explanation for nested or subqueries. Thanks so much!
@tejdeepak8092
@tejdeepak8092 Год назад
hey mike, thanks for explaining the complex topic in SQL nested query!
@juanfernandomoyanoramirez600
@juanfernandomoyanoramirez600 2 года назад
I come here from the google data analytics professional certificate and this video allowed me to understand this new concept. Thank you very much.
@simplemente_humano
@simplemente_humano 3 года назад
Great video! Step by step, clear, organized! good job! Just subscribed!
@lebzgold7475
@lebzgold7475 2 года назад
Thanks for simplifying the logic behind this!
@TheMinaProject
@TheMinaProject 2 года назад
THANK YOU! BEST tutorial out there! Had no idea what was going on it class for the past 40 minutes and you sorted it in 10 😂
@muneebbolo
@muneebbolo 6 месяцев назад
Hahaha
@guitardude1007
@guitardude1007 5 лет назад
Lol love The Office examples. Great informative video
@JohnSmith-ok9sn
@JohnSmith-ok9sn 3 года назад
Mike... You are the M-A-A-AN!!! Thank you, so much! This was so clearly and simply esplained! On top of everything, I was working on understanding the consecutiveness of the steps machine is working in, as it evaluates the query, and I saw, (in my mind), that it worked from inside-out of the parentheses - in other words, from within the innermost parentheses' query, gradually, toward the outermost query - but, I had seen some conflicting, (to a novice, like me), explanations and examples before, and wasn't entirely clear on this. And YOU, Sir, did it so clearly, and eloquently! Thank You!
@cybervee_
@cybervee_ 5 лет назад
your explanation helps me a lot, thank you so much!
@hildakamiza3947
@hildakamiza3947 5 лет назад
you have helped alot .. clear and understandable explaination
@elij8852
@elij8852 5 лет назад
Great tutorials man. I have an internship coming up in just over a week. These videos are making me feel prepped for it.
@TheGamerfreak1555
@TheGamerfreak1555 2 года назад
How'd that go
@giving1106
@giving1106 7 месяцев назад
Very good breakdown, thank you!
@shahzainahmed6851
@shahzainahmed6851 2 года назад
u are so good tbh , very clear
@muneebbolo
@muneebbolo 6 месяцев назад
Love ♥ this tutorial Keep it up!
@eishaamir5601
@eishaamir5601 2 года назад
Love how you used people from the Office!!!
@thrang_eo
@thrang_eo 6 лет назад
Very Well Explained Sir ♥️♥️ Thank You
@Jahrhcy
@Jahrhcy 4 года назад
Great explanation! Thank you.
@mr.goldenball333
@mr.goldenball333 2 года назад
Thank you. It really helps!
@mashawickramasinghe195
@mashawickramasinghe195 Год назад
Great video!!!👏
@jbizzy4829
@jbizzy4829 9 месяцев назад
This was so helpful! Thanks
@rokunuzjahanrudro7571
@rokunuzjahanrudro7571 Год назад
Great explanation!!!
@user-hc5kq6zd1n
@user-hc5kq6zd1n 4 года назад
Thank you for the explanation ! :D
@Shiyounin
@Shiyounin 3 года назад
Thanks, Dane, you're Great.
@parmarrutik7845
@parmarrutik7845 2 года назад
nice video i want this types of more scenerio base questions solutions
@mibo747
@mibo747 3 года назад
Wow.... what a clarity of explanation
@davidsmith6028
@davidsmith6028 9 месяцев назад
Awesome video, thanks so much
@ChicaSonidera
@ChicaSonidera 2 года назад
Great content, thanks.
@thecritico
@thecritico Год назад
Subscribed!!! Great videos with C and now SQL.
@balrajvirdee1087
@balrajvirdee1087 Год назад
Great video 👍🏽
@rootcause5322
@rootcause5322 2 года назад
This was lit 🔥 Thank u bruh...
@mmm-bj8zg
@mmm-bj8zg Год назад
Taught me something my teacher couldn't, appreciate it
@NicolasSilvaVasault
@NicolasSilvaVasault 5 лет назад
i'm making an ecommerce website already made a db for it, but we are expanding so the nested model sounds like the best solution due to the filters and all that, but after watching this and making those huge queries (not difficult tho, just thinking about the whole mantainance and all the what would happen ifs), i feel like hierarchy model could be better, (can't work with mongodb since our hosting doesn't support it), what do you recommend me?
@safiya1363
@safiya1363 3 года назад
Can I just say a HUGE thank you as I was stuck on this one coursework question
@shreyansraghu6709
@shreyansraghu6709 2 года назад
Hi, I liked working on the data camp, are there any websites with a lot of tables and questions to solve more problems and practice?
@DJJSerpico
@DJJSerpico 5 лет назад
great job! Contributed!
@sonamuhialdeen7866
@sonamuhialdeen7866 3 года назад
Amazing tutorial
@ravikhatri24
@ravikhatri24 4 года назад
You are the best man ,👌
@chalmerilexus2072
@chalmerilexus2072 3 года назад
You are a Star...
@samcruz8188
@samcruz8188 4 года назад
I’m having a difficult time finding any information on using an openquery as a subquery within an openquery. Is this possible and if so, how do I accomplish that?
@sugaslate14
@sugaslate14 Год назад
Can you do this if your trying to pull from separate dbos? Or do I have to create a view with the info from each dbo I need?
@mrinalmishra1437
@mrinalmishra1437 2 года назад
Just wow ❤🙏🙏🙌
@Enkumnu
@Enkumnu Год назад
Thank you. Help a lot
@dawitworku821
@dawitworku821 3 месяца назад
Very helpful. Than you.
@RealityCheck6T9
@RealityCheck6T9 4 года назад
Thanks, good video
@bradleynguyen1429
@bradleynguyen1429 3 года назад
Would it make a huge difference if the branch manager query was the outer query, and the client withing the nested query?
@yollyle9488
@yollyle9488 5 лет назад
thanks for the vid
@julian.castro18
@julian.castro18 3 года назад
Thank you!
@anuradhajha9798
@anuradhajha9798 3 года назад
thanks, wonderful session.
@WarrenCromartie2
@WarrenCromartie2 4 года назад
Very clearly explained. I'm just getting to grips with SQL, so forgive my ignorance! Would you use a nesting approach if you wanted to retrieve relational data for over 1000 items using Oracle where you can't input more than 1K items in a single search? Or is there a more efficient way of querying large numbers of inputs using Developer? Hope that makes sense :-)
@elifece7847
@elifece7847 5 лет назад
can you give more questions for nested queries?
@stevodoe4900
@stevodoe4900 5 лет назад
So, is it bad I didn't recognize the "re-brand" and my first thought was come on some guy stole "Mike's" video?? And, here I was going to subscribe. After a brief look at the videos, I realized my mistake and pounded that sub button. Because anyone with a hunger for computer knowledge this is a good place to start. The tutorials are simple and easy to follow for beginners and more advanced users.
@rshad4ever
@rshad4ever 3 года назад
omg, this is better than my professor
@jethalalnhk2409
@jethalalnhk2409 3 года назад
very nicely explained thank you
@popoporiBN
@popoporiBN 2 года назад
believe it or not our database design lecturer did not use practical example like this and just read of what syntaxes does from textbook. holy i just understood it in a minute!
@DEEPAKS0306
@DEEPAKS0306 3 года назад
Being an office fanatic....i understood it better🤣👍👌
@SRISAILAPUBRAHMAJIBCE
@SRISAILAPUBRAHMAJIBCE Год назад
nice explanation 😇 sir
@laurenrackley4336
@laurenrackley4336 3 года назад
Can you do another video on a nested query but with group by? I am trying to use SQL to count adverse events for a clinical trial.
@akj3388
@akj3388 2 года назад
In the very first subquery example, how would you display the client id as well along with employee's first and last name? I am happy if it repeats the name.
@demetridoes
@demetridoes 3 года назад
thank you so much!
@yuneecorn
@yuneecorn 4 года назад
I wish I can give a million likes for this video. Thank you.
@joelnada3483
@joelnada3483 3 года назад
Thank you very much bro....
@seshurampilla4200
@seshurampilla4200 4 года назад
I want to validate data from a table A and insert into another table B if value matches from A, how can we achieve it ?
@angelikm6142
@angelikm6142 3 года назад
Thanks you
@itsdaj
@itsdaj 3 года назад
Great video, just one problem though. You do not have Dwight in the employee table. :)
@sharonmarin153
@sharonmarin153 5 лет назад
Amazing
@bradleynguyen1429
@bradleynguyen1429 3 года назад
May I asked why you would not use an IN with the client branch ID in the where clause, I don’t understand why parenthesis would used in this sense. Thank you
@nadeemzeaiter1995
@nadeemzeaiter1995 3 года назад
respect!
@ujjawal6660
@ujjawal6660 5 лет назад
thnk u so much sir
@hanmwahx268
@hanmwahx268 3 года назад
Thank you so much dude
@god-speed03
@god-speed03 4 дня назад
Life was good when we were giraffe academy's students
@queryhsje7514
@queryhsje7514 Год назад
Hi, thanks for the video! Sorry I don't get it why in the first example you were using 'IN', while in the 2nd example you were using '='? Can you explain a little detail, please? Thanks.
@dimitrisapostolakis8669
@dimitrisapostolakis8669 4 года назад
if you dont assume you know michael scott id cant you just do it through employee table? for exp select client.client_name from client where client.branch_id = ( select employee.branch_id from employee where first_name='Michael' and last_name='Scott' //you could use LIKE instead of = limit 1);
@e3uz
@e3uz 4 года назад
If in client there was not mng_id, is that a good query for the last exercise? SELECT client_id, client_name FROM client WHERE client_id IN ( SELECT client_id FROM works_with WHERE emp_id IN( SELECT emp_id FROM employee WHERE super_id IN ( SELECT mgr_id FROM branch WHERE mgr_id IN ( SELECT emp_id FROM employee WHERE employee.first_name = 'Michael' AND employee.last_name = 'Scott' ) ) OR (first_name = 'Michael' AND last_name = 'Scott') ) )
@asrEthio
@asrEthio 3 года назад
Please make mor vedios on Database we need it!
@sabatinosalsano743
@sabatinosalsano743 4 года назад
in these cases would be more simple just using the join statement
@christopherrahme780
@christopherrahme780 5 лет назад
Assuming you don't know Michael Scott's ID: -- Clients handled by Michael Scott's branch SELECT client_name FROM client WHERE branch_id IN (SELECT branch_id FROM branch WHERE mgr_id IN (SELECT emp_id FROM employee WHERE first_name = "Michael" AND last_name = "Scott")); -- Or you can do SELECT client_name FROM client WHERE branch_id IN (SELECT branch_id FROM branch WHERE mgr_id IN (SELECT emp_id FROM employee WHERE CONCAT(first_name, " ", last_name) = "Michael Scott"));
@dogantilkici
@dogantilkici 5 лет назад
Thanks
@svens3722
@svens3722 Год назад
i need this with calculated columns. any suggestions?
@TheGoldenriff
@TheGoldenriff 5 лет назад
Can we also just use an inner join? Select * from employee inner join works_with where total_sales > 30,000 ?
@lawrencew8243
@lawrencew8243 4 года назад
I'm new to this stuff and wondering the same thing..
@TheBorjj
@TheBorjj 4 года назад
Any answers?
@jain4613
@jain4613 4 года назад
yes it gives the same result
@edinelezi7691
@edinelezi7691 4 года назад
Any nested correlated query can be rewritten as a normal query, it says in the book Fundamentals of Database Design.
@ndzalama1
@ndzalama1 4 года назад
Great examples, how can one play with that data (online practice
@GrumpySalmon
@GrumpySalmon 3 года назад
Can you create a video with nested queries and joins at the same time?
@alisonlarson4882
@alisonlarson4882 5 лет назад
When is it more appropriate to use a nested query over a join? Or is it preference?
@djataberk1
@djataberk1 5 лет назад
Great question
@danjones9999
@danjones9999 4 года назад
Anyone?
@linda33528
@linda33528 4 года назад
literally my question and I can't find an answer either :)
@WarrenCromartie2
@WarrenCromartie2 4 года назад
Yes, a very good question. I would have used a table join for the first example in this tutorial, but as I'm relatively new to SQL, I assumed there was either a good reason not to, OR he was merely trying to demonstrate a principle.
@missdhara6434
@missdhara6434 3 года назад
I have an exam tomorrow this whole nested queries thing can get pretty complicated if you dont under stand the basics of the dos and don'ts and when to use certain functions with nested queries.
@lillycyriac6972
@lillycyriac6972 5 лет назад
Explanation are helpful but I do have one question.. isn't the first question to find out employees for a single client.. not sure the query address the question
@thesmallplateau
@thesmallplateau 4 года назад
I guess he means all employees who have sold +3k to one client (not a specific client). So if we have an employee who sold 1500 to a client and 1500 to another client should not be counted
@sriramch5157
@sriramch5157 10 месяцев назад
We can use inner join
@mohammadmayar5544
@mohammadmayar5544 2 года назад
Can you make video of if condition and while loop as well please
@leydaalvarado5400
@leydaalvarado5400 4 года назад
love The Office reference lol
@azddinebouarbi4948
@azddinebouarbi4948 2 года назад
bravo
@pawenobis5386
@pawenobis5386 5 лет назад
Who on Earth gave him a dislike?!
Далее
On Delete | SQL | Tutorial 19
8:32
Просмотров 27 тыс.
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Просмотров 131 тыс.
ПОМОГЛА НАЗЫВАЕТСЯ😂
00:20
Просмотров 804 тыс.
How to do Subqueries in SQL with Examples
8:20
Просмотров 166 тыс.
Understanding Correlated Queries in SQL
8:13
Просмотров 139 тыс.
Expert Level SQL Tutorial
23:27
Просмотров 153 тыс.
When to Use a Subquery in SQL
8:50
Просмотров 32 тыс.
Advanced SQL Tutorial | Subqueries
8:37
Просмотров 370 тыс.
Converting ER Diagrams to Schemas | SQL | Tutorial 23
12:25
Triggers | SQL | Tutorial 20
12:26
Просмотров 105 тыс.