Course
PostgreSQL Summary Stats and Window Functions
IntermediateSkill Level
Updated 01/2026Start Course for Free
Included withPremium or Teams
SQLProgramming4 hr12 videos44 Exercises3,550 XP120K+Statement of Accomplishment
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.Loved by learners at thousands of companies
Training 2 or more people?
Try DataCamp for BusinessCourse Description
Feels like what you want to learn?
Start Course for FreeWhat you'll learn
- Assess the use of aggregate window functions with frame clauses to compute running totals, moving averages, and other cumulative statistics
- Differentiate among core window functions such as ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD, FIRST_VALUE, LAST_VALUE, and NTILE based on their operational behavior and analytic applications
- Distinguish between ROWS and RANGE frame types and Evaluate their effects on result sets when ordering columns contain duplicate values
- Identify the essential syntax elements of PostgreSQL window functions, including the OVER clause, ORDER BY, PARTITION BY, and frame definitions
- Recognize advanced data-reshaping and summarization techniques using CROSSTAB pivoting, ROLLUP, and CUBE to generate multi-level totals in PostgreSQL analyses.
Prerequisites
Data Manipulation in SQL1
Introduction to window functions
In this chapter, you'll learn what window functions are, and the two basic window function subclauses, ORDER BY and PARTITION BY.
2
Fetching, ranking, and paging
In this chapter, you'll learn three practical applications of window functions: fetching values from different parts of the table, ranking rows according to their values, and binning rows into different tables.
3
Aggregate window functions and frames
In this chapter, you'll learn how to use aggregate functions you're familiar with, like
AVG() and SUM(), as window functions, as well as how to define frames to change a window function's output.4
Beyond window functions
In this last chapter, you'll learn some techniques and functions that are useful when used together with window functions.
PostgreSQL Summary Stats and Window Functions
Course Complete
Earn Statement of Accomplishment
Add this credential to your LinkedIn profile, resume, or CVShare it on social media and in your performance review
Included withPremium or Teams
Enroll NowJoin over 19 million learners and start PostgreSQL Summary Stats and Window Functions today!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.