You are on page 1of 16

09

Time Series
in Data Analysis with SQL
Content

01 Definition
02 Practice with
SQL

@Copyright 2022 Mazhocdata


Definition
• Time series analysis is a specific way of analyzing a sequence of data points collected over an interval of time. What
sets time series data apart from other data is that the analysis can show how variables change over time.
• Time series analysis is one of the most common types of analysis done with SQL. A time series is a sequence of
measurements or data points recorded in time order, often at regularly spaced intervals.

@Copyright 2022 Mazhocdata


Content

01 Definition
02 Practice with
SQL

@Copyright 2022 Mazhocdata


1 Trending the Data
• With time series data, we often want to look for trends in the data. A trend is simply the direction in which the data is
moving. It may be moving up or increasing over time, or it may be moving down or decreasing over time.

Simple trend Comparing Component:


product/ location/ staff /

@Copyright 2022 Mazhocdata


1 Trending the Data
• When working with time series data that has multiple parts or attributes that constitute a whole, it’s often useful to
analyze each part’s contribution to the whole and whether that has changed over time

Percent of Total Calculations

@Copyright 2022 Mazhocdata


1 Trending the Data
• When working with time series data that has multiple parts or attributes that constitute a whole, it’s often useful to
analyze each part’s contribution to the whole and whether that has changed over time

Percent Change over Time

@Copyright 2022 Mazhocdata


2 Rolling Time Windows
• Time series data is often noisy, a challenge for one of our primary goals of finding patterns. We’ve seen how
aggregating data, such as from monthly to yearly, can smooth out the results and make them easier to interpret.
• Another technique for smoothing data is rolling time windows, also known as moving calculations, that take into
account multiple periods

MEASURING “ACTIVE USERS”: DAU, WAU, AND MAU


• DAU: Daily active user
• WAU: Weekly active user
• MAU: Monthly active user

@Copyright 2022 Mazhocdata


3. Moving Average
• The simple moving average (SMA) is a straightforward technical indicator that is obtained by summing the recent
data points in a given set and dividing the total by the number of time periods.
• In financial markets, analysts and investors use the SMA indicator to determine buy and sell signals for securities.
The SMA helps to identify support and resistance prices to obtain signals on where to enter or exit a trade.

@Copyright 2022 Mazhocdata


Summary

@Copyright 2022 Mazhocdata


Data understanding
1. How many key variables are there in your data set?

@Copyright 2022 Mazhocdata


Data understanding
2. How many dimensions are there in your data set?

@Copyright 2022 Mazhocdata


Data understanding
2. How many dimensions are there in your data set?

@Copyright 2022 Mazhocdata


First Project
Analyze time series data to find trends and insights of Billing transaction variable

@Copyright 2022 Mazhocdata


First Project

@Copyright 2022 Mazhocdata


Thanks

You might also like