...

/

Partitioning into Different Frames

Partitioning into Different Frames

Learn about partitioning in frames and the competing drivers.

Other frames can be defined when using the parition by clause. It allows us to define those rows defining that share a common property with the current row as peer rows, and the property can be defined as a partition.

Pick a race

In the Formula 1 database, we have a results table with results from all the known races. Let’s pick a race:

Press + to interact
select * from races where raceid = 890;

It gives the following output:

-[ RECORD 1 ]-----------------------------------------------------
raceid    | 890
year      | 2013
round     | 10
circuitid | 11
name      | Hungarian Grand Prix
date      | 2013-07-28
time      | 12:00:00
url       | http://en.wikipedia.org/wiki/2013_Hungarian_Grand_Prix

Listing

...