Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
1. Introduction
PARTITION BY
Summary

Instruction

Hello again. Previously, we taught you the simplest window function type – an aggregate with OVER(). In that case, the window consisted of all the rows in the query result. Today, we'll show you how you can change that window.

But before we do, we're going to take a short trip... by train. Let's get to know today's system for managing trains, routes, relations and tickets of a railway company in the UK.

Exercise

Select all the information from the table train.

Each train has an id, model, maximum speed expressed in km/h, production year, the number of first class seats and second class seats. Pretty intuitive, right?