PostgreSQL Summary Stats and Window Functions

Learn how to create queries for analytics and data engineering with window functions, the SQL secret weapon!
Start Course for Free
Clock4 HoursPlay12 VideosCode44 ExercisesGroup8,697 Learners
Database3550 XP

Create Your Free Account

Google LinkedInFacebook
or
By continuing you accept the Terms of Use and Privacy Policy. You also accept that you are aware that your data will be stored outside of the EU and that you are above the age of 16.

Loved by learners at thousands of companies


Course Description

Have you ever wondered how data professionals use SQL to solve real-world business problems, like generating rankings, calculating moving averages and running totals, deduplicating data, or performing time intelligence? If you already know how to select, filter, order, join and group data with SQL, this course is your next step. By the end, you will be writing queries like a pro! You will learn how to create queries for analytics and data engineering with window functions, the SQL secret weapon! Using flights data, you will discover how simple it is to use window functions, and how flexible and efficient they are.

  1. 1

    Introduction to window functions

    Free
    In this chapter, you'll learn what window functions are, and the two basic window function subclauses, ORDER BY and PARTITION BY.
    Play Chapter Now
  2. 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.
    Play Chapter Now
  3. 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.
    Play Chapter Now
  4. 4

    Beyond window functions

    In this last chapter, you'll learn some techniques and functions that are useful when used together with window functions.
    Play Chapter Now
In the following tracks
SQL Fundamentals
Collaborators
Sumedh PanchadharMona KhalilMarianna Lamnina
Prerequisites
Intermediate SQL
Fernando Gonzalez Prada Headshot

Fernando Gonzalez Prada

Data Science Consultant
Fernando is a data science professional with over 20 years of experience in databases, data integration, machine learning, and business intelligence. He designs analytics solutions with Microsoft Data Platform technologies and open source products. He has degrees in economics and IT certifications and is studying Business Analytics at Columbia University. Fernando loves teaching data science to beginners and helping experienced professionals who are transitioning to data science.
See More
Michel Semaan Headshot

Michel Semaan

Data Scientist
Michel is a data scientist who's worked at leading Middle-Eastern startups like Bookwitty (e-commerce) and Anghami (music streaming). He loves using open-source technologies like Python, R, and SQL to analyze data, optimize KPIs, and solve problems.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA

Join over 6 million learners and start PostgreSQL Summary Stats and Window Functions today!

Create Your Free Account

Google LinkedInFacebook
or
By continuing you accept the Terms of Use and Privacy Policy. You also accept that you are aware that your data will be stored outside of the EU and that you are above the age of 16.