Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Get to know the data
1. Introduction
Get to know the OVER() clause
Computations with OVER()
Aggregate functions with OVER()
Using OVER() with WHERE
Summary

Instruction

Hello!
In the previous part, we showed you a very complicated query. It might have looked a bit scary. Don't panic – step by step, you'll learn the elements that make up window functions. At the end of this course, that scary query is going to look so easy!

In this section, we're going to start from the very beginning: the OVER() clause. It's one of the most basic window function components, and it's essential to everything else you're going to learn.

But first things first. We'll start with introducing today's tables. We're going to deal with some business data: employees, departments and department purchases. Sure, it's not very original – you can find similar tables in lots of database examples. But that's exactly the point – we want you to feel comfortable when you take your first steps with window functions.

Exercise

Select all the information from the table Employee.

Each employee has a first and last name, a department, a salary and a number of full years they have worked for the company (so far).