diff options
author | emkael <emkael@tlen.pl> | 2016-04-28 16:29:02 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-04-28 16:29:02 +0200 |
commit | 998aa98f8ddc35164a39b6ab74b27610b2379411 (patch) | |
tree | ac60e4738c0f2f5245b59ddf0a89bbe12e2896c1 /views/README.md | |
parent | 0f0025d1aed469c4e15e601a28506e7ac28d5569 (diff) |
* views for lifespan statistics
Diffstat (limited to 'views/README.md')
-rw-r--r-- | views/README.md | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/views/README.md b/views/README.md index 2eee268..48825a9 100644 --- a/views/README.md +++ b/views/README.md @@ -22,7 +22,7 @@ Under the hood The convention for all the views is to use `underscored_lowercase_names` for views and newly added fields, to distinguish ergast-goodies input from the original structure (which uses `camelCase` naming). -The views are split into files, which are fully independent, i.e. refer only to the original tables (or to each other, but only in order they're defined within the file), with the exception of `champion_teammates.sql`, which depends on both `champions.sql` and `teammates.sql`. +The views are split into files, which are fully independent, i.e. refer only to the original tables (or to each other, but only in order they're defined within the file), with the exception of `champion_teammates.sql`, which depends on both `champions.sql` and `teammates.sql` and `dead_vs_living.sql`, which depends on `career_length.sql` and [`11_death_dates`](../import/11_death_dates.sql) extension. `career_length.sql` ------------------- @@ -45,6 +45,17 @@ Two views resulting in a list of World Drivers' Champions and World Constructors Views assume ascending chronological order of raceId values for races in each season, and could be improved (but probably with a drop of performance) to select "last race of the season" (for which the standings are taken) by date. +`dead_vs_living.sql` +-------------------- + +Two views showing stats regarding driver lifespan. + +`dead_vs_living` counts the tallies of dead drivers vs. living drivers, at the time of each race date. + +`debut_age_vs_lifespan` shows average driver age (current age for living drivers, age of death for dead) vs. average debut age for each race date. + +Both views require importing death dates from the [`11_death_dates.sql`](../import/11_death_dates.sql) extension, as well as `debut_age` view from `career_length.sql`. + `full_season_drivers.sql` ------------------------- |