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,400 courses taught by industry experts.

Grouping data with ROLLUP

Grouping data with ROLLUP

- [Instructor] In this movie, we'll be exploring how to group data using rollup in SQL. So as we revisit our data model again, we'll be having a look at the higher education employee salaries table where we have variables such as department, earnings, name of the school, and also job description. And we'll also be revisiting the PhD table, which includes variables such as academic year, department, living wage ratio, and also 12 month gross pay. So let's navigate to Amazon Redshift. And we'll open up our editor. And we can tap into this icon to access the chat pane. And we'll start by asking a very simple question. So we'll ask, perform a rollup of the total 12 month gross pay for the university that offers computer science in the academic year. So I want to make my prompt as specific as possible. So I only want the results from the academic year, which is 2020 to 2021. So this was during the time of COVID. So I want to ask Amazon Q, please perform a rollup of the total 12 month gross…

Contents