Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Cracking the Data Science Interview

You're reading from  Cracking the Data Science Interview

Product type Book
Published in Feb 2024
Publisher Packt
ISBN-13 9781805120506
Pages 404 pages
Edition 1st Edition
Languages
Authors (2):
Leondra R. Gonzalez Leondra R. Gonzalez
Profile icon Leondra R. Gonzalez
Aaren Stubberfield Aaren Stubberfield
Profile icon Aaren Stubberfield
View More author details

Table of Contents (21) Chapters

Preface Part 1: Breaking into the Data Science Field
Chapter 1: Exploring Today’s Modern Data Science Landscape Chapter 2: Finding a Job in Data Science Part 2: Manipulating and Managing Data
Chapter 3: Programming with Python Chapter 4: Visualizing Data and Data Storytelling Chapter 5: Querying Databases with SQL Chapter 6: Scripting with Shell and Bash Commands in Linux Chapter 7: Using Git for Version Control Part 3: Exploring Artificial Intelligence
Chapter 8: Mining Data with Probability and Statistics Chapter 9: Understanding Feature Engineering and Preparing Data for Modeling Chapter 10: Mastering Machine Learning Concepts Chapter 11: Building Networks with Deep Learning Chapter 12: Implementing Machine Learning Solutions with MLOps Part 4: Getting the Job
Chapter 13: Mastering the Interview Rounds Chapter 14: Negotiating Compensation Index Other Books You May Enjoy

Merging tables with joins

SQL joins are used to combine rows from two or more tables based on a related column between them, providing a complete view of the data. We previously hinted at these related columns as primary keys and foreign keys.

As a refresher, a primary key is a column (or a combination of columns) in a database table that uniquely identifies each row in that table. A foreign key, on the other hand, is a column or a combination of columns in a table that establishes a link or a relationship to the primary key of another table.

As we dive into SQL joins, we will put our knowledge of primary and foreign keys to work!

Note

When discussing SQL joins, we will mostly focus on joining two tables to simplify the concepts. Traditionally, two joined tables are referred to as the left table and the right table.

Inner joins

INNER JOIN selects records that have matching values in both tables. Figure 5.8 best demonstrates the logic of this join type:

...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}