SQL Joins Made VERY SIMPLE!

  Рет қаралды 4,471

Data Wizardry

Data Wizardry

Күн бұрын

Пікірлер: 12
@joeltorres1237
@joeltorres1237 Жыл бұрын
Wow! this looks like a great project! Especially being able to combine sql with a viz tool.
@igbegrowth4442
@igbegrowth4442 2 ай бұрын
Thanks for this video
@osoriomatucurane9511
@osoriomatucurane9511 3 ай бұрын
Absolutely Awesome tutorial on join operations extended to filter. Thank you for highlighting the impact of cardinality on the size of the result set. I am left to understand the case use or when to decide to change the cardinality when performing the join, as displayed with the cte on the data wizardry web site under the sql basics healthcare
@nithinanthony1724
@nithinanthony1724 Жыл бұрын
Nice one Sir
@konata_fan
@konata_fan Жыл бұрын
So useful, thanks👍
@xavierwood6128
@xavierwood6128 Жыл бұрын
First of all, this video and your previous 60 min. video were amazing! The explanations are concise and the examples are easy to follow! I had a question regarding your example of including the "pat.first = 'Adelina'" in the inner join statement. I tried using "where pat.first = 'Adelina' " after the join statement and I got the same result of 34 rows returned. Do you think one approach is better than the other, or would it just be a preference? Thank you for all of your work in making videos!
@DataWizardry
@DataWizardry Жыл бұрын
Great question! What's nice about SQL is that there's often multiple ways to achieve the same result. So, when I am faced with two different methods of achieving the same result, I go with the option that's easier to understand. So if I were tasked with looking up all patients named, Adelina, that had vaccines, my preferred way of writing it out would actually be: SELECT pat.id, pat.first, pat.last, imm.description, imm.patient FROM patients as pat INNER JOIN immunizations as imm on pat.id = imm.patient WHERE pat.first = 'Adelina' For me, it's just cleaner this way. Rather than the example in my tutorial where I used pat.first = 'Adelina' as a second condition in the join statement. Something about that approach just takes me a little longer to process what's happening. Whereas the above code is much more straight-forward. Making code as easy to understand as possible is a good habit to get into if you ever had to return to your work months later. (And your co-workers that might inherit the code, will appreciate you too!)
@xavierwood6128
@xavierwood6128 Жыл бұрын
@@DataWizardry I appreciate the in-depth answer! I also find the "WHERE" method to be easier to digest, so we're on the same page there. Thanks once again and I'm looking forward to your next videos!
@joeltorres1237
@joeltorres1237 Жыл бұрын
What was tripping me up was that patients table has only one Adelina Simonis for example and yet with left join on immunizations table I'm getting 10 instances of Adelina Simonis. Is this what you mean by a one to many? Bc there's many rows of that matching ID in immunizations table. It was a great lesson. And I like how you give a quick intro into what's next.
@DataWizardry
@DataWizardry Жыл бұрын
Great question! Yes, this is a one to many. And we'll be looking at this in the next video I will be publishing which is on cardinality. But yes, you are correct. The patient Adelina Simonis shows up once in the patient table. And 10 ten times in the immunizations table (had a stretch of 10 annual flu shots from 1974-1983). When the one to many join happens, some of the information starts to repeat itself however many number of times there was a match in the other table. In this case, ten rows are created to show each of those flu shots that she received. Though, the patient informaiton remains the same so it gets duplicated. This query should help visualize that a little bit better: SELECT pat.id, pat.first, pat.last, imm.description, imm.patient, imm.date as immunization_given FROM patients as pat INNER JOIN immunizations as imm on pat.id = imm.patient WHERE pat.id = 'e398337a-523b-fbed-1dc9-f308588869d1'
@drnamita9670
@drnamita9670 Жыл бұрын
Awesome videos.
@karthikswamy8848
@karthikswamy8848 11 ай бұрын
Hi , I am a pediatric Anesthesiologist . I have a lot of questions - can I have ur email id so that I can connnect with u. Thanks
Are you making this #1 SQL Error?
14:19
Data Wizardry
Рет қаралды 2,4 М.
💻 Build this Flu Shots Dashboard with SQL and Tableau!
1:18:21
Data Wizardry
Рет қаралды 16 М.
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 16 МЛН
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 12 МЛН
Smart Sigma Kid #funny #sigma
00:14
CRAZY GREAPA
Рет қаралды 83 МЛН
Ask a Healthcare Data Analyst - Questions and Answers
24:00
Data Wizardry
Рет қаралды 7 М.
👉 SQL Basics with Healthcare Data | 1 Hour
1:00:18
Data Wizardry
Рет қаралды 43 М.
Data Cleaning Project: Patient Survey Data
50:06
Data Wizardry
Рет қаралды 4,6 М.
ETL Made Simple | What Data Analysts Should Know
6:58
Data Wizardry
Рет қаралды 14 М.
Learn SQL Joins
21:39
Decomplexify
Рет қаралды 53 М.
Healthcare Data Analyst Career Tips | How to Excel in your Industry
10:22
How I Became a Data Analyst in Healthcare
11:29
Data Wizardry
Рет қаралды 21 М.
What it's like to be a Healthcare Data Analyst
10:38
Data Wizardry
Рет қаралды 17 М.
Learn Tableau Basics in 1 Hour - With Healthcare Data 💊
1:10:46
Data Wizardry
Рет қаралды 38 М.