From the course: Advanced SQL for Query Tuning and Performance Optimization
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Solution: Creating a materialized view - SQL Tutorial
From the course: Advanced SQL for Query Tuning and Performance Optimization
Solution: Creating a materialized view
(upbeat music) - [Instructor] The solution is to use the data definition statement, create materialized views. Then we'll specify the name we want to use in this case, mv_sensor_metric. And then we'll specify a select statement that specifies the attributes or the columns that we want to include from the sensor_metric table. And then we also have a where clause where we'll specify the sensor_id as greater than 90,000.