Stop Using Inner Joins!

preview_player
Показать описание
Do you really need an inner join there? In this video I will discuss a common misuse of inner joins.
Рекомендации по теме
Комментарии
Автор

Awesome video! Definitely changing how I am going to be approaching problems. Keep these coming please!!!! ...

juslee
Автор

Im just proud of myself that i started learning sql 2 weeks ago and i understand about 95% of what ur talking about. Goals

passportbro
Автор

Good one man. Optimization is much needed !!

prabhaker
Автор

Really interesting James, thanks for that 👏🏽

demba
Автор

Really Helpfull :)
I am glad that i found this channel

leopatrick
Автор

Great Video! Short, concise, and providing unique content. You are not going to find this kind of thing all over the internet. Glad I found your videos!

garisoncyr
Автор

Loved it. I never thought of this before... Thanks mate.

prasadj
Автор

With a bit of design work (e.g. referential integrity constraints between the Sales and Country tables), the "AU" data won't be able to be missing. Then the inner join will always work fine. Whether that is done or not depends on other factors, e.g. the number of records in the tables.
The trouble with the approach in the video is that other statistics can become misleading, e.g. a query reporting the total sales from Australia.

AndrewJens
Автор

Great perspective and thanks for sharing

emmanuelaolaiya
Автор

I learned this the hard way when I was pulling customers and comments. Inner join would not pull customers without a comment.

iliashterev
Автор

Seems like a bit of an odd one, this. It seems like the sort of thing even a beginner should understand. If I was to interview and test a junior SQL developer for a job (something I'll be helping to do within the next couple of months) and they didn't know this, I would be very hesitant to employ them! Your statement about this sort of thing separating an expert or a true professional from a novice or intermediate developer just seems way off!

bujin
Автор

Never ever ever expect complete high quality data in your database. I learned it the hard way

sasstemir
Автор

hey James, your videos are amazing. Do you mind covering scenarios on where to use group by vs window function. sometimes we run in situations where the output can be achieved using either approach. I know from a performance perspective group by is more efficient however since window functions are easier to read and write I always start with window function I need to break this mental block of mine and therefore if you can go through this topic that would be highly appreciated. Again thanks for all the amazing videos.

ankurlodha
Автор

This is so good. Expert level Sql YouTubers are so hard to come by. Subscribed. Also if I may, can you do some more Sql challenges where you solve hard problems using expert Sql. I would really love to learn and watch those. I really love Sql.

nonefvnfvnjnjnjevjenjvonej
Автор

Hahhahahah the ending made me laugh a lot. Great video, thnx for the lesson.

maximessina
Автор

I felt so guilty the way he said, "I think you are using too many inner join".

JosephItopaAbubakar
Автор

one needs to know the biz rules and how tables are tied together. otherwise, yeah you better know why using an inner join ;-) Great video mate!

hadireg
Автор

you are the best ! thnx !!
I will never use inner join in my life again 😭 .... just kidding

rabahakrour
Автор

Thanks for the video. By default the mstr reports does a inner join between fact and dimension tables, so is it advised to change this behavior ?

palanit
Автор

no disrespect because you raise an important fact about joins. that said…

you should have specified that this is most relevant when a target column is nullable; eg country code in this example.. otherwise if it’s non nullable the outer join is pointless.

also this is like one of the first hard lessons you learn when you start writing real queries.

mishasawangwan