From the course: Text to SQL: Amazon Redshift Serverless for Generative SQL in Amazon Q

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Multi-table joins

Multi-table joins

- [Instructor] In this movie, we'll be revisiting our data model again. And we have six datasets. Oftentimes where we have business questions that we want answered, we have different columns located in different tables, and we want to bring all the data together so we can answer our business problem. So in this data model, we can see that the QS World Rankings dataset is, it's actually related to the final_post_college_salaries with a unique key. If we hover over this line, it's linked by the primary key index, which is also the composite key for rank in the final_post_college_salaries. And if we wanted to join the QS dataset with the Students_Grading_Dataset, we'll just hover over this relationship, and we can see that it's joined by isr_rank. And then also, if we have a look at higher_ed_employee_salaries and how it's related to the QS World Rankings dataset, we click on the relationship, and it's joined by the primary key, Department, in the higher_ed dataset, and also institution…

Contents