From the course: Advanced SQL for Data Science: Time Series

Unlock the full course today

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

Querying time series data

Querying time series data - SQL Tutorial

From the course: Advanced SQL for Data Science: Time Series

Start my 1-month free trial

Querying time series data

- [Instructor] There are common query patterns we see when working with time series data. We often query the latest data. Another common practice is comparing time periods. For example, comparing the average revenue generated in a particular store on a particular day versus that same day in the prior month. Another common pattern is to summarize or perform some other aggregate function over a time window. Now, it's important to think about granularity when we talk about time series, and the granularity is defined by the frequency of the data that is generated. Now, typically, the latest data is very fine grained. So, for example, it might be at the second or minute level. Now, over time, as the data ages, we're less likely to really want to query the fine-grained data. So, for example, we don't necessarily want to know what the CPU utilization was on a particular server six week's ago at one in the afternoon. Instead, we're more likely to want to know summaries or aggregates about…

Contents