diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-04-09 14:14:15 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-04-09 14:14:15 +0200 |
commit | 9a6b346598d19e13a4bf0d3af6a34573253e16b7 (patch) | |
tree | f9601f76bc593dc40ca7e6345fdaad49eaa3b289 /dbinit/views.sql | |
parent | 98044423d9f962f4eb6cd6541b6b30a447b23d8f (diff) |
fix views and functions
Diffstat (limited to 'dbinit/views.sql')
-rw-r--r-- | dbinit/views.sql | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/dbinit/views.sql b/dbinit/views.sql index 80918a1..5cdee0f 100644 --- a/dbinit/views.sql +++ b/dbinit/views.sql @@ -1,3 +1,5 @@ +use `formula1`; + create view `formula1`.`vwcalendar` as select `calendar`.`year` as `year`, @@ -5,10 +7,10 @@ select `racedate`.`date` as `date`, `circuit`.`name` as `name` from - `calendar` - join `racedate` on `calendar`.`ID` = `racedate`.`calendarID` - join `racedatecircuit` on `racedate`.`ID` = `racedatecircuit`.`raceDateID` - join `circuit` on `racedatecircuit`.`circuitID` = `circuit`.`ID`; + `racedate` + join `calendar` on `calendar`.`ID` = `racedate`.`calendarID` + join `race` on `race`.`raceDateID` = `racedate`.`ID` + join `circuit` on `race`.`circuitID` = `circuit`.`ID`; create view `formula1`.`vwteamcoureurs` as select |