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
From the course: Text to SQL: Amazon Redshift Serverless for Generative SQL in Amazon Q
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Producing more relevant SQL queries2m 38s
-
(Locked)
Debugging SQL error messages5m 44s
-
Filtering data6m 42s
-
(Locked)
Multi-table joins6m 37s
-
(Locked)
Creating CASE statements4m 29s
-
(Locked)
Exploring nested queries4m 18s
-
(Locked)
Determining the number of working days between two dates3m 10s
-
(Locked)
Creating a view3m 21s
-
(Locked)
-
-