MySQL: SUBQUERIES

  Рет қаралды 116,429

Bro Code

Bro Code

Күн бұрын

Пікірлер: 83
@BroCodez
@BroCodez 2 жыл бұрын
SELECT first_name, last_name, hourly_pay, (SELECT AVG(hourly_pay) FROM employees) AS avg_pay FROM employees; SELECT first_name, last_name FROM employees WHERE hourly_pay > (SELECT AVG(hourly_pay) FROM employees); SELECT first_name, last_name FROM customers WHERE customer_id IN (SELECT DISTINCT customer_id FROM transactions WHERE customer_id IS NOT NULL); SELECT first_name, last_name FROM customers WHERE customer_id NOT IN (SELECT DISTINCT customer_id FROM transactions WHERE customer_id IS NOT NULL);
@sairams1928
@sairams1928 2 жыл бұрын
Good job bro waiting for this playlist from you I am a big fan of your work
@sairams1928
@sairams1928 2 жыл бұрын
Don't quit this playlist bro because I need to learn MySQL from a good instructor like you
@sairams1928
@sairams1928 2 жыл бұрын
Make a playlist that will help to learn everything about SQL bro. It will definitely useful for me and also lots and lots of your subscribers so please continue don't quit this and make everyone as a master in mysql those who are all learning these videos. Thanks for your efforts 🙂
@adriatic123
@adriatic123 Жыл бұрын
After so many wrong and complicated examples on this topic finally a good and clear explanation, it helped me thanks.
@faidex7340
@faidex7340 10 ай бұрын
In just a few minutes you made me understand what they explained to me at school for almost a month
@mostwanted9817
@mostwanted9817 2 жыл бұрын
Yo, I've been watching and learning from this course, soo much. I've tired learning SQL from books, but you explain it very easy. You are a hero, thank you BroCode!
@enriquepasa
@enriquepasa 2 жыл бұрын
Yeah, been in the same spot in ISTQB course too. Not quite pleasant
@abdelrhmansayed340
@abdelrhmansayed340 2 ай бұрын
i see this playlist before each step of my current hiring process 😁😁. Thanks a lot
@quantumjunction
@quantumjunction Жыл бұрын
Finally I've been looking for a good explanation all week and you delivered 🙌
@jeevan7657
@jeevan7657 24 күн бұрын
Thank you so much for the lecture 😊🙏
@thatotman3942
@thatotman3942 Жыл бұрын
your videos are so concise!!!! Niceeeee
@mr.nobody4159
@mr.nobody4159 Жыл бұрын
Couldn't have explained it in a better way... appreciate it man!!!
@vincent49654
@vincent49654 3 ай бұрын
Best explaination online
@chetanvashisth3005
@chetanvashisth3005 10 ай бұрын
A very clear and concise explanation.❤❤❤
@pabitrakb5291
@pabitrakb5291 Жыл бұрын
Great explanation Thank you ☺️
@marie-sanna
@marie-sanna 5 ай бұрын
Bro Code, from the bottom of my heart: THANK YOU. I'm learning sooo much from your videos, you're a life saver.
@chikabenie2593
@chikabenie2593 4 ай бұрын
This is simplified...have been racking the brain for some days now..a milliin thanks
@7igor7
@7igor7 4 ай бұрын
great video explanation was very clear
@Siuuu-gy8ro
@Siuuu-gy8ro 2 жыл бұрын
i am also learning to use subquerry's. Tbh it's pretty damn hard, but i feel like it's one of those things you learn with much much practice
@XxXxnoor
@XxXxnoor 10 ай бұрын
I just started learning sql 2 weeks ago and i'm really struggling with subqueries. Does it get easier with practise?
@MagnusAnand
@MagnusAnand Жыл бұрын
Very well explained
@enriquepasa
@enriquepasa 2 жыл бұрын
Hi bro, thanks for the vid. Much better than most creators do. Much appreciated
@alien3.0c
@alien3.0c Жыл бұрын
Thanks, well explained
@DiyAsianGuy
@DiyAsianGuy Жыл бұрын
Excellent tutorial!
@alihadi-vv4yb
@alihadi-vv4yb Ай бұрын
great explanation thank you.
@salmahazem1616
@salmahazem1616 3 ай бұрын
thank you for this it's really useful bro💓💓💓💓
@yuss.0349
@yuss.0349 6 ай бұрын
best video about this argument, ty so much
@gkairdropincome
@gkairdropincome 10 ай бұрын
Verey nice project
@Arzene22
@Arzene22 9 ай бұрын
My professor made this more complicated than it seems. Thank you!
@Hassan-vb1hy
@Hassan-vb1hy Жыл бұрын
You are the bestttttttttttt❤❤❤
@jugmilic2096
@jugmilic2096 8 ай бұрын
Thank you so much❤You explained so good❤Keep your work up❤You are insane
@pranav3579
@pranav3579 9 ай бұрын
Thanks a lot really helped .
@AdebankeBamidele
@AdebankeBamidele Жыл бұрын
I finally got to understand this topic. This was amazing. Kudos and Bravos😂
@nischalshrestha9063
@nischalshrestha9063 3 ай бұрын
can also use INNER JOIN for this right? IN is more appropriate for smaller tasks though. Am I right?
@pepijnschaap9166
@pepijnschaap9166 2 жыл бұрын
thanks man u explained it really chill, not like the other ones with all weird ass terms that i dont even know
@pyb8216
@pyb8216 2 ай бұрын
"just imagine we replace the sub-query by what it returns" made me understand it
@damiankadziela978
@damiankadziela978 Жыл бұрын
The customer and transactions example would be normally done with JOIN: SELECT DISTINCT first_name, last_name FROM customers JOIN transactions ON customers.customer_id = transactions.customer_id; it's a bit shorter query, but it's cool to see that you can do this with other methods as well.
@DeeNelsonDee_nels_on_duty
@DeeNelsonDee_nels_on_duty 11 ай бұрын
that's exactly what i thought so would you use an inner join for this?
@Victoria-dh9jp
@Victoria-dh9jp Жыл бұрын
Great video sir 👌
@rodneyivers8677
@rodneyivers8677 Жыл бұрын
I have really enjoyed following your tutorials. I would like to complete some of the exercises on my own system. Are there files available to create the DB and data that you use in your videos? They would be greatly appreciated.
@BenjitsuID
@BenjitsuID Жыл бұрын
you can find free ones online just search it up
@dawitworku821
@dawitworku821 8 ай бұрын
Very helpful. Than you.
@sargata3054
@sargata3054 4 ай бұрын
This helped me so much. Thank you!!”
@Atabanza
@Atabanza Жыл бұрын
Thank you from Colombia
@lunatichigh2896
@lunatichigh2896 3 ай бұрын
I'm here because I'll have an interview in a few days. Good luck to me lol
@iweijiew.2716
@iweijiew.2716 5 ай бұрын
Thanks a lot ❤
@nockin7976
@nockin7976 Жыл бұрын
Thank you from Chile
@aedrynngravitt2290
@aedrynngravitt2290 11 ай бұрын
Do you have a template to upload into MYSQL to use your example databases to follow along and type with you?
@SandipanSarkar-c8v
@SandipanSarkar-c8v Ай бұрын
Finished watching
@TvideosTv
@TvideosTv 8 ай бұрын
Thank you so much
@danielfekete9761
@danielfekete9761 2 ай бұрын
LEGEND!
@fearless6141
@fearless6141 Жыл бұрын
There are two types of subqueries?
@sreyamathew327
@sreyamathew327 Жыл бұрын
Could you please post a detailed video for correlated subqueries?
@guitarguy07
@guitarguy07 Жыл бұрын
love you bro
@arielespindola1759
@arielespindola1759 Жыл бұрын
I think you should touch on the performance too! These subqueries can be costly and suck up CPU in large tables. In the first example, the average was computed per row while $14.35 was needed only once. Other than that, great video. Thanks!
@catalintodoran4392
@catalintodoran4392 9 ай бұрын
Thank you
@dhxx2905
@dhxx2905 Жыл бұрын
Lmao plankton now is the employee of Krusty Krab 😂
@basingse7934
@basingse7934 Жыл бұрын
the best, thank you
@bluecafe509
@bluecafe509 Жыл бұрын
Thank you.
@kristijanlazarev
@kristijanlazarev Жыл бұрын
godlike
@marxLz
@marxLz Жыл бұрын
This looks like a nested "if" and "loop" statements in Java. I wouldn't be learning those without your tutorials in Java. And I know I will be learning those further when I start learning the other prog. languages you have on your playlist. Thank you so much!
@googlegoogle1610
@googlegoogle1610 2 жыл бұрын
bro code is a legend, but I think it is better to upload a video illustrating correlated subqueries
@bodymohmed6493
@bodymohmed6493 Жыл бұрын
🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩
@thubelihlentabela5735
@thubelihlentabela5735 8 ай бұрын
the concat function does it have to change the table also becaues the query is running fine but there are no changes at the schema although i refresh it ]
@ZahraBalooti
@ZahraBalooti 2 ай бұрын
wish you could use microsoft data sets
@MDCRITICA
@MDCRITICA Жыл бұрын
I'm not sure if someone could answer this but I'll try: SELECT first_name, last_name, hourly_pay FROM employees WHERE hourly_pay > (SELECT AVG(hourly_pay) FROM employees); In this query, why can't we just, after the "greater than", write "AVG(hourly_pay)" ??
@ScumbagLemon
@ScumbagLemon Жыл бұрын
That's what I don't get either, what's the benefit to sub-queries over shorter commands like this?
@omairtech6711
@omairtech6711 Жыл бұрын
Because you have to specify the table name. There could be other tables as well and MySQL needs to know exactly which one you want the result from.
@fearless6141
@fearless6141 Жыл бұрын
Can't we write then avg(employees.hourly_pay)
@Harrison10Miles
@Harrison10Miles Жыл бұрын
What about subqueries inside FROM?
@lol-zw1mz
@lol-zw1mz 8 ай бұрын
Goated
@xdrive300011
@xdrive300011 Жыл бұрын
ok i was pretty frustrated until i started this video hearing Bro Code calling the manager as "Krabs" or craps? is this intentional? Bor Code is my type!
@SmQwerty123
@SmQwerty123 Жыл бұрын
Or you can use a window function
@Qupidboi
@Qupidboi 2 ай бұрын
incredibly loud
@Ali-ys5vk
@Ali-ys5vk Ай бұрын
Bro is carring us
@RamiSobhani
@RamiSobhani 21 күн бұрын
watching this again
@gliecco
@gliecco 10 ай бұрын
Lmao this guy should open a how to give actual good examples course
@ojeagadaniel
@ojeagadaniel 8 ай бұрын
I'm from the google data analytics programme and the instructor taking this part of the course is the worst ever. I didn't struggle understanding others but oh well, i have to use other resources to understand what she's saying. Very ambiguous Thanks anyway Bro
@sivuyilesifuba
@sivuyilesifuba Жыл бұрын
MySQL: GROUP BY
5:08
Bro Code
Рет қаралды 70 М.
When to Use a Subquery in SQL
8:50
Database Star
Рет қаралды 38 М.
Какой я клей? | CLEX #shorts
0:59
CLEX
Рет қаралды 1,9 МЛН
How to have fun with a child 🤣 Food wrap frame! #shorts
0:21
BadaBOOM!
Рет қаралды 17 МЛН
Vampire SUCKS Human Energy 🧛🏻‍♂️🪫 (ft. @StevenHe )
0:34
Alan Chikin Chow
Рет қаралды 138 МЛН
MySQL: TRIGGERS
16:50
Bro Code
Рет қаралды 142 М.
Nested Queries | SQL | Tutorial 18
10:23
Giraffe Academy
Рет қаралды 186 М.
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 443 М.
MySQL: JOINS are easy (INNER, LEFT, RIGHT)
5:04
Bro Code
Рет қаралды 504 М.
Advanced SQL Tutorial | Subqueries
8:37
Alex The Analyst
Рет қаралды 404 М.
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Anton Putra
Рет қаралды 228 М.
How to do Subqueries in SQL with Examples
8:20
Becoming a Data Scientist
Рет қаралды 178 М.
Какой я клей? | CLEX #shorts
0:59
CLEX
Рет қаралды 1,9 МЛН