Skip to Content
SQL for Data Analytics
book

SQL for Data Analytics

by Upom Malik, Matt Goldwasser, Benjamin Johnston
August 2019
Beginner to intermediate
386 pages
7h 15m
English
Packt Publishing
Content preview from SQL for Data Analytics

5. Window Functions for Data Analysis

Learning Objectives

By the end of this chapter, you will be able to:

  • Explain what a window function is
  • Write basic window functions
  • Use common window functions to calculate statistics
  • Analyze sales data using window functions and a window frame

In this chapter, we will cover window functions, functions similar to an aggregate function but that allow a new range of capabilities and insights.

Introduction

In the previous chapter, we discussed aggregate functions, functions that can take a large group of rows and output a single value for them. Often, being able to summarize a group of rows to a single value is important and useful. However, there are times when you want to keep the individual rows ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SQL for Data Analysis

SQL for Data Analysis

Cathy Tanimura
SQL for Data Analytics - Third Edition

SQL for Data Analytics - Third Edition

Jun Shan, Matt Goldwasser, Upom Malik, Benjamin Johnston
SQL for Data Scientists

SQL for Data Scientists

Renee M. P. Teate

Publisher Resources

ISBN: 9781789807356Supplemental Content