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 of window function: an aggregate function with an empty-bracketed OVER() clause. 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.

Before we do this, we're going to take a short trip... by train. Let's get to know a system for managing trains, routes, journeys, and tickets for a fictional UK railway.

Exercise

Select all the information from the table Train.

Each train has an ID, a model, a maximum speed (in km/h), a production year, and a certain number of first class seats and second class seats. Pretty intuitive, right?