diff options
Diffstat (limited to 'dbinit/views.sql')
-rw-r--r-- | dbinit/views.sql | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/dbinit/views.sql b/dbinit/views.sql index a995ee6..80918a1 100644 --- a/dbinit/views.sql +++ b/dbinit/views.sql @@ -1,28 +1,25 @@ -CREATE -VIEW `formula1`.`vwcalendar` AS -SELECT - `calendar`.`year` AS `year`, - `racedate`.`week` AS `week`, - `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`))); +create view `formula1`.`vwcalendar` as +select + `calendar`.`year` as `year`, + `racedate`.`week` as `week`, + `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`; - -CREATE -VIEW `formula1`.`vwteamcoureurs` AS -SELECT - `calendar`.`ID` AS `ID`, - `teams`.`teamNumber` AS `teamNumber`, - `teams`.`teamName` AS `teamName`, - `member`.`firstName` AS `firstName`, - `member`.`middleName` AS `middleName`, - `member`.`lastName` AS `lastName` -FROM - (((`calendar` - JOIN `teams` ON ((`calendar`.`ID` = `teams`.`calendarID`))) - JOIN `teamsmember` ON ((`teams`.`ID` = `teamsmember`.`teamsID`))) - JOIN `member` ON ((`teamsmember`.`memberID` = `member`.`ID`))); +create view `formula1`.`vwteamcoureurs` as +select + `calendar`.`ID` as `ID`, + `teams`.`teamNumber` as `teamNumber`, + `teams`.`teamName` as `teamName`, + `member`.`firstName` as `firstName`, + `member`.`middleName` as `middleName`, + `member`.`lastName` as `lastName` +from + `calendar` + join `teams` on `calendar`.`ID` = `teams`.`calendarID` + join `teamsmember` on `teams`.`ID` = `teamsmember`.`teamsID` + join `member` on `teamsmember`.`memberID` = `member`.`ID`; |