From the course: Advanced SQL for Application Development
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Challenge: Define a partitioned table
From the course: Advanced SQL for Application Development
Challenge: Define a partitioned table
(chill music) - [Instructor] In this challenge, I'd like you to define a sales history table that's partitioned by month of sale. Now in this example, we're going to assume that months are represented as integers from one to 12. And the set of attributes in this table should include a product ID, a product name, which is a variable character, a product type, which is also a variable character, total units sold, which can be an integer, and then the month of the sale. And again, the month of sale could be an integer. Also, create a primary key using both the month of sale and the product ID.
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)
Overview of partitioning7m 10s
-
(Locked)
Range partitioning5m 52s
-
List partitioning3m 7s
-
(Locked)
Hash partitioning4m 27s
-
(Locked)
Querying partitioned tables1m 3s
-
(Locked)
Using read-only replicas1m 41s
-
(Locked)
Challenge: Define a partitioned table37s
-
(Locked)
Solution: Defining a partitioned table54s
-
(Locked)
-
-
-