From the course: Advanced SQL: Solving Interpolation Challenges

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Solution: Multiple sensors

Solution: Multiple sensors

- Let's start by copying the views we created earlier. The Coolant Minute Temperature view is no longer needed. So we can start with a view that adds the previous and next known one and the row' a position. We need to select from minute temperatures, modify the name, and before I attempt to create this view. Maybe, maybe it will work as is? Yeah, I know wishful thinking. Execute, and something is obviously wrong. And it's a little hard to see, so let's add an order by. And remember that views cannot have an order by because, a view must return a set, and a set has no order. Looking at the coolant temperatures, we see that both previous and next known temperatures are completely wrong. Where did the 124 come from? And what about the 85? We have no coolant readings with these temperatures. These temperatures belong to the other sensors. The Max Temperature Window Aggregate Function is partitioned only by the…

Contents