SQL Query | How to find most frequently purchased together items

preview_player
Показать описание
In this tutorial, we write a SQL Query to find the most frequently purchased together items.

Practice dataset and SQL statement is available here

How to install SQL Server for practice?

Check out the complete list of SQL Query Interview Questions -

Best Data Science / Analytics / SQL courses
Learn SQL Basics for Data Science Specialization

Beginners to Python Programming

Data Science and Business Analytics with Python

IBM Data Science Professional Certificate

Data Science Fundamentals with Python and SQL Specialization

Python for Everybody Specialization

Google Data Analytics Professional Certificate

Coursera Plus - Data Science Career Skills

Please do not forget to like, subscribe and share.

For enrolling and enquiries, please contact us at
Рекомендации по теме
Комментарии
Автор

This is interesting!!! I'm curious, I don't understand how do you compare 2 productIDs? Why would AAA be bigger than BBB or vice versa?

filipzivkovic
Автор

Important scenario. Thank you for sharing.

designanddecor
Автор

Super, I will use this daily in my work thanks

briandennehy
Автор

This was something new and interesting for me. I can use this in my organisation.

riddlex
Автор

Lovely tutorial! Just one question, will ID comparison work if you have something like a UUID?

umarbabajidda
Автор

I love your video,
Can you please give a clue on how to filter for a specific product? For example, frequently bought items for product with ID AAA.

ayooluwaemmanuel
Автор

This is a classic solution. Just one question: why are you specifying O1.CustomerID = O2.CustomerID in the join conditions? Obviously, there will be only one CustomerID for each OrderID.

nikolaybaranov
Автор

This will show only two products that are frequently bought together am I right? How can I use what two items and then three and four because I have 20 items and I need to know what Items are bought together this video is really helpful thank you for the effort

itsbashar