diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-03-24 11:35:16 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-03-24 11:35:16 +0100 |
commit | edbdc5e5893802e74b7d8043f7e1817f77ac1c3a (patch) | |
tree | dc01b6f1606618f99f7c35fbf1b6fb5b6b1c0c03 /dbinit/views.sql | |
parent | 7567984ca753c5a01fd8c5310e5aac5ef39a6fbc (diff) |
format views.sql
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`; |