From the course: Advanced SQL for Data Scientists

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Generating data with generate_sequence

Generating data with generate_sequence

From the course: Advanced SQL for Data Scientists

Start my 1-month free trial

Generating data with generate_sequence

- [Instructor] Okay, before we get into using explained plan let's create some data for us to work with. Now, the first thing I want to do is just paste in some code that we have seen already earlier. Basically what I want to do is recreate an IOT sensor measurement table, and create a couple of partitions. I won't go over all the details 'cause I've covered this in an earlier video but I do want to point out a couple of things. In this case, we're going to use measurement date. We're actually going to make that a timestamp so we can include hours and minutes as well. And I just want to point out in terms of creating partitions we want to keep in mind that this last value that at the end of the range is not inclusive. I always forget this. So for example, if I set this date to be 2021 01-31, that's a perfectly valid range to go from January 1st to January 31st, but it's not inclusive. I always forget that. So I just want…

Contents