SQL Tutorial - 29: SQL JOINS

  Рет қаралды 358,503

The Bad Tutorials

The Bad Tutorials

10 жыл бұрын

In this tutorial we'll take a look at SQL JOINS and see how we can pull data from two tables through a single query!

Пікірлер: 120
@mohitnehete2
@mohitnehete2 3 ай бұрын
Watching in 2024😢
@suravshrestha5623
@suravshrestha5623 6 жыл бұрын
Very simple and to the point explanation of how JOINS work in SQL.
@max5175
@max5175 7 жыл бұрын
Great tutorial. I was pretty intimidated by JOINS but you made it nice and simple. Thanks man
@Dartholit1
@Dartholit1 5 жыл бұрын
Thank you so much for you SQL videos!!! I'm passing my database class thanks to you.
@rockxiong8264
@rockxiong8264 Жыл бұрын
Thank you very much for the second part. Most of the videos on joins doesn't include the second portion of this video where you utilize the "where" clause. Earned yourself a subscriber.
@k_oliver
@k_oliver 8 ай бұрын
One of the simplest and yet ery helpful tutorial Ive found! thanks man! keep this up :)
@joan.nakibuuka1322
@joan.nakibuuka1322 4 жыл бұрын
I'm new to this and you are making it way easier than i imagined. Thank you
@timchunk1248
@timchunk1248 7 жыл бұрын
Thank you ! I view this video twice, and i learned join!
@nyanganjikingsley4664
@nyanganjikingsley4664 9 ай бұрын
I love the way you present your tutorials sir
@yuratea1700
@yuratea1700 3 жыл бұрын
Thank you so much for your time and your awesome explanations. Greetings from Lithuania! :)
@sarangrb1375
@sarangrb1375 2 жыл бұрын
This is all I needed looked for hours and hours and couldn't find anything solid. Great work man thanks👍🏻👍🏻
@madhurbhatia89
@madhurbhatia89 2 жыл бұрын
Thanks Sarang, glad you found this helpful :)
@shckwave5230
@shckwave5230 2 жыл бұрын
@@madhurbhatia89 speak in Hindi for better explanation
@Runderwunderknopf
@Runderwunderknopf 8 жыл бұрын
Oh Maaaan, your Turoials are awesome! Thank you!
@blainejantze6565
@blainejantze6565 4 жыл бұрын
Great Tutorial, makes JOINS look easy
@ShoppingStew
@ShoppingStew 6 жыл бұрын
Thank you so much for these tutorials!
@ryanmccleave3562
@ryanmccleave3562 8 жыл бұрын
Love this tutorial, thank you!
@tetsuoshima454
@tetsuoshima454 9 жыл бұрын
Already passed mid-way mark. Great work.
@wayup7985
@wayup7985 Жыл бұрын
Great tutorial man. Big thumbs up brother!
@azanshaikh7825
@azanshaikh7825 5 жыл бұрын
this wasn't bad at all. Thank you,kind sir!
@test_132
@test_132 2 жыл бұрын
Thanks for sharing I just learned joins!!!
@humanbeing4684
@humanbeing4684 3 жыл бұрын
Thanks a ton, This has greatly helped me, I am defintely going to share with my friends who is looking for join tutorial Also, I just subscribed you
@sadatakhtar5927
@sadatakhtar5927 3 жыл бұрын
You explained that really well, thanks
@zxvb778
@zxvb778 2 жыл бұрын
IT helped me alot sir keep making vids but iam 11years trying to learn sql it helped me alot thanks..
@leenalzebn6176
@leenalzebn6176 Жыл бұрын
Very useful and straight to point thank you
@AliAnsari14
@AliAnsari14 Жыл бұрын
This is the best way to perform an Excel VLOOKUP in SQL, thanks
@anassel98
@anassel98 8 ай бұрын
Thanks, helped me a lot!
@rajeshakkineni5127
@rajeshakkineni5127 3 жыл бұрын
Simply super bro.. you made my day
@preethivaidyanathan3368
@preethivaidyanathan3368 6 жыл бұрын
So helpful, thank you!
@Pchbt
@Pchbt 7 жыл бұрын
Very clear, thank you !
@emaduddinzafar7207
@emaduddinzafar7207 2 жыл бұрын
Khush raho yaaar asan krdeya tumne ❤️
@k___T1151
@k___T1151 11 күн бұрын
tnx ,you explaind it in a simple way
@ParentFor07Cats
@ParentFor07Cats 4 жыл бұрын
it is just awesome man thanks :)
@sofianetech379
@sofianetech379 19 күн бұрын
thank you so mutch the firs method is awsome
@darwish2098
@darwish2098 2 жыл бұрын
That last bit of the video was helpful to really understand the Joins since I use the 'less preferred one but more commonly used' lol didnt event realize it
@badarlasaiteja9172
@badarlasaiteja9172 Жыл бұрын
The second method is called equi join we use = operator and first one is using join keyword . Nice explanation for beginners
@leonardbukenya8618
@leonardbukenya8618 3 жыл бұрын
Great stuff!
@MohseenAttarVlogs
@MohseenAttarVlogs 2 жыл бұрын
Super Like I am a beginner you made it simple Thank You !
@salmanfaris4679
@salmanfaris4679 4 жыл бұрын
its very helpful tutuorial,thanks bro
@kanikasharma9503
@kanikasharma9503 9 жыл бұрын
your videoz r vryy helpful!!!
@karanjesrani6889
@karanjesrani6889 3 жыл бұрын
was very helpful simple video!!
@taz3592
@taz3592 3 жыл бұрын
Nice tutorial!
@darshanabhuyan8479
@darshanabhuyan8479 3 жыл бұрын
Excellent explanation
@sparrowp2251
@sparrowp2251 Жыл бұрын
btw very simple and easy to understand thanks!
@ninaa7661
@ninaa7661 5 жыл бұрын
Suggestion to show both tables on the screen while creating JOIN query
@dipeshparma8605
@dipeshparma8605 3 жыл бұрын
What
@mosessamuel6918
@mosessamuel6918 3 жыл бұрын
Pro tip : watch series at flixzone. I've been using them for watching lots of of movies lately.
@marcusnash2001
@marcusnash2001 3 жыл бұрын
@Moses Samuel Definitely, been watching on flixzone for years myself :)
@dustinfranco9201
@dustinfranco9201 3 жыл бұрын
@Moses Samuel Yea, have been watching on Flixzone for years myself :D
@woedemgodoga5624
@woedemgodoga5624 25 күн бұрын
Thank you. well understood. Can you please do a video on left joi,right join and outer join
@doenil470
@doenil470 5 жыл бұрын
You a genius.
@rodm8113
@rodm8113 Жыл бұрын
better than my uni professor!
@kmlearnchannel9415
@kmlearnchannel9415 2 жыл бұрын
Well explain and clear
@mattallen9406
@mattallen9406 2 жыл бұрын
Thanks boss! This SQL sh*t is light work.
@Rawman_56
@Rawman_56 10 ай бұрын
By giving example like this you are automatically getting my likes😊
@JATINKUMAR-qu4vi
@JATINKUMAR-qu4vi 2 жыл бұрын
Really helpful
@diptijain
@diptijain Жыл бұрын
Thank you
@eriktorres6067
@eriktorres6067 2 жыл бұрын
Nicely explained without extra bs
@ae1550
@ae1550 8 жыл бұрын
Superb
@LiuLinplus
@LiuLinplus 10 жыл бұрын
It helps,thx.
@sparrowp2251
@sparrowp2251 Жыл бұрын
tbh nobody ever really told me that joins were difficult !i guess it is one of the pros self studying hahahaha
@okkamagad
@okkamagad 9 жыл бұрын
Hey Madhur, i see that we got 12 results when we used the Join query, but we got 13 results when we used Where clause, can you explain this briefly ? is it not recommended to use where clause for this kind of queries ?
@iostream_gaming3184
@iostream_gaming3184 2 жыл бұрын
Suppose you are given a relation grade points(grade, points), which provides a conversion from letter grades in the takes relation to numeric scores; for example, an “A” grade could be specified to correspond to 4 points, an “A−” to 3.7 points, a “B+” to 3.3 points, a “B” to 3 points, and so on. The grade points earned by a student for a course offering (section) is defined as the number of credits for the course multiplied by the numeric points for the grade that the student received. Given the above relation, and our university schema, write each of the following queries in SQL. You can assume for simplicity that no takes tuple has the null value for grade. a. Find the total grade-points earned by the student with ID 12345, across all courses taken by the student. b. Find the grade-point average (GPA) for the above student, that is, the total gradepoints divided by the total credits for the associated courses. c. Find the ID and the grade-point average of every student. LODI PA TUTORIAL NGA NITO PARA MAY GUIDE ME SA SUNOD NA ACTIVITY SALAMAT
@JATINKUMAR-qu4vi
@JATINKUMAR-qu4vi 2 жыл бұрын
Thank a lot 👍👍
@madhurbhatia89
@madhurbhatia89 2 жыл бұрын
Thanks for watching!
@hlokomani
@hlokomani Жыл бұрын
cheers man
@donny2123
@donny2123 8 жыл бұрын
thank you.
@smtbhav3014
@smtbhav3014 8 жыл бұрын
Hi Madhur, I am trying to create a table in sql workbench where i want create a column where i want to insert ip address but not sure which data type should i select, so could you help me with the correct data type for ip address.
@katara4955
@katara4955 2 жыл бұрын
what would the query be if I wanted ALL the columns from both the tables? Do I still have to type out each column? Is there a shorter way? like Select * from both tables and join them somehow?
@billiejl6237
@billiejl6237 7 жыл бұрын
THANK YOU!
@madhurbhatia89
@madhurbhatia89 7 жыл бұрын
+Billie JL Cheers!
@sentimentalisme61
@sentimentalisme61 4 жыл бұрын
Hello thank you for you tuto what is the interface that you are using ?
@at5music622
@at5music622 6 жыл бұрын
Did you make id in the second table as primary key?
@29ibrahimsayed95
@29ibrahimsayed95 Жыл бұрын
awesome
@yanirazelaya5378
@yanirazelaya5378 7 жыл бұрын
Excellent work, The bad Tutorialssssssssss
@madhurbhatia89
@madhurbhatia89 7 жыл бұрын
+Sonia Chavez Thanks for watching!
@AnonP2X3YZ
@AnonP2X3YZ 3 жыл бұрын
thanks
@Showtime_Southside
@Showtime_Southside 2 жыл бұрын
What is the query to find no in ascending or descending order from 2 different tables at the same time?
@VampireHeartization
@VampireHeartization 5 жыл бұрын
You can actually notice that the amount of results when using an Inner Join is 12, and then after you removed it to use WHERE, it is 13. I was wondering what are you missing out on?
@osamaghazal2480
@osamaghazal2480 7 жыл бұрын
If anyone here can help I tried following exact the same steps to execute the join command but it didn't work ? Is that because he populated the id column in the tutorial_info table from the old tutorial or what ?? and if we have to fetch the id column from the old tutorial, what is the syntax for inserting the remaining values (views, likes, dislikes, shares) without writing the id value ? how can we skip that?
@SahitiSeemakurti
@SahitiSeemakurti 8 жыл бұрын
Nice Tutorial, especially when I watch it in 1.5X speed. Also, This JON example you did, is it an INNER JOIN or OUTTER JOIN? How do you distinguish these two JOINs in code?
@abhijeetgupto
@abhijeetgupto 6 жыл бұрын
Sahiti Ss exactly , how to distinguish?
@MotoGPFan33
@MotoGPFan33 11 күн бұрын
I am having trouble finding help on how to do Insert Into Select w/ join feature . I have data in table 1, which describes a motorsports racing session. I have table 2 which has information about each of the riders including their bike number, team , manufacturer, name, etc. - both tables have a column Rider ID, where the Riders table (table 2) has Rider ID as the primary key, and on the Table 1 , Rider ID is the foreign key. I want to write a insert into select join statement that merges in the individual rider data such as bike number, team, manufacturer , and name - into Table 1 . Can you help me please?
@Showtime_Southside
@Showtime_Southside 2 жыл бұрын
What is the query to find out highest values from 2 different tables at the same time?
@gtry-bq5mw
@gtry-bq5mw 2 жыл бұрын
hi, do i need to put 'AS' in clausing the table? sorry, i'm confused
@kaoutarlkhou4232
@kaoutarlkhou4232 9 жыл бұрын
no need for triggers, to join 2 tables?
@marijuanastoner27
@marijuanastoner27 7 жыл бұрын
HI i used WHERE instead of ON and the same also functioned is this wrong.
@successorantigha9466
@successorantigha9466 Жыл бұрын
I have a question: what's the name of this new joined table? How can I see it to enable me to query it
@pareshprajapati3282
@pareshprajapati3282 9 ай бұрын
How can I add column named first name and last name from database employee to table name title with all the data
@janarddansarkar3447
@janarddansarkar3447 7 жыл бұрын
can we join more than two tables?
@Rajeeb701
@Rajeeb701 7 жыл бұрын
nice
@real_anil9688
@real_anil9688 6 жыл бұрын
what if we have to write 'officer's name' as a string it will end at officers .
@joselitoreyes7187
@joselitoreyes7187 Жыл бұрын
How to input: films starting with S and T in SQL. Thank you
@user-ys2be4cx8d
@user-ys2be4cx8d 7 жыл бұрын
What kind of sql is this? I'm using oracle and it's giving me error "from tutorials as t" (@6:06) where t is underlined in red, saying SQL command not properly ended. What gives?
@SatyamJhasatyam2410
@SatyamJhasatyam2410 7 жыл бұрын
he is using MYSQL wrorkbench
@ezabelaah9451
@ezabelaah9451 3 жыл бұрын
Hi I would like to take sql training from you. Please let me know how much you will charge. Thanks
@jamilamammadova4556
@jamilamammadova4556 3 жыл бұрын
How can I get sql file like in that video?
@AbCd-zo5tb
@AbCd-zo5tb 5 жыл бұрын
i don't understand why people don't like the video after watching it?
@sadmanpranto9026
@sadmanpranto9026 3 жыл бұрын
You didn't explain why ON is preferred over WHERE.
@JunaidMunirVlogs
@JunaidMunirVlogs 3 жыл бұрын
your name is good.
@dherendrachaudhary6728
@dherendrachaudhary6728 7 жыл бұрын
we can perform join operation only when two table have same number of row and column.
@ramakrishnannarayanan4202
@ramakrishnannarayanan4202 7 жыл бұрын
can you please provide the insert queries for your table.
@damiantoczek4814
@damiantoczek4814 6 жыл бұрын
(table).(column) = SELECT users.username, users.profiledescription,stats.postcount FROM users,stats; With Insert you do the same. INSERT INTO users,stats (users.username,users.profiledescription,stats.postcount) VALUES ('$username','$description','postcount'); You could also do: INSERT INTO users,stats (username,profiledescription,postcount) VALUES ('$username','$description','postcount'); You need to keep in mind that you can not have 2 same colum names in two tables, if you have 2 same column names you need to specify the table. 'table.username' or 'stats.username'. If you have only a "profiledescription" column inside the "users" table but NOT inside "stats" you do NOT need to type 'users.profiledescription'. @Edit, before people start crying and leaving shit comments on me, i know that Sai's comment is 1year+ old, this video is from 2014 and i still came hear and learned something. When someone watches this tutorial... he might also ask about the "Insert query"... so here is the answer (above).
@dhanashrishete792
@dhanashrishete792 3 жыл бұрын
@badtutorial What is 'CROSS JOINS'
@abhishekshukla9970
@abhishekshukla9970 7 жыл бұрын
how to rename colunm?
@shwetagarg6892
@shwetagarg6892 5 жыл бұрын
SELECT column_name AS rename FROM table_name;
@chandrapolineni2452
@chandrapolineni2452 9 жыл бұрын
I am using Oracle DB and while aliasing a table name i am unable to use AS. I had to use table alias like this " tutorial t". Is this because of Oracle dialect?
@munawwarshaikh3143
@munawwarshaikh3143 Жыл бұрын
Assalamualaikum
@tommyjones1357
@tommyjones1357 3 жыл бұрын
Alright, for those poor bastards out there trying to learning Kusto Query Language where tutorials do not exist, the translation would be: | join OTHER_TABLE on $right._COLUMN_NAME == $left._COLUMN_NAME This will merge the two tables where the column name is matches.
@varunbhardwaj7032
@varunbhardwaj7032 8 жыл бұрын
hi Madhur, what is ur email id?
@munawwarshaikh3143
@munawwarshaikh3143 Жыл бұрын
Urdu my sikhaen plz
@RavenTech1
@RavenTech1 2 жыл бұрын
Am i the only one who didn't understand much?
@jitendrasonkar6055
@jitendrasonkar6055 2 жыл бұрын
Kya kya bolta hai Bhai Hindi bol Yaar Kuch samjh Nahi kya kya Kiya
SQL Tutorial - 30: Using GROUP BY Clause with SQL JOINS
5:17
The Bad Tutorials
Рет қаралды 97 М.
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 56 МЛН
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 99 МЛН
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 57 МЛН
Learn SQL Joins
21:38
Decomplexify
Рет қаралды 43 М.
How do SQL Indexes Work
12:12
kudvenkat
Рет қаралды 588 М.
SQL Tutorial - 41: SUBSTR(), RIGHT() & LEFT() Functions
4:34
The Bad Tutorials
Рет қаралды 68 М.
We Learn SQL #3 | SQL JOIN Basics
3:47
We Learn SQL
Рет қаралды 10 М.
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 56 МЛН