View difference between Paste ID: zNBWDDSf and bDgRdwy7
SHOW: | | - or go back to the newest paste.
1-
SELECT m.`Model Year`, d.`Division Name` , m.`Model Name` , m.`Model ID`, m.`Model Comment`, m.`Effective Date`, s.`Style ID`, s.`Style Name`, s.`True Base Price`, s.`Invoice`, s.`MSRP`, s.`Destination`, s.`Passenger Capacity`, s.`Passenger Doors`, s.`Manual Trans`, s.`Auto Trans`, s.`CFDriveTrain`, s.`CFBodyType`, ts7.`Text` AS `EPA Classification`, ts256.`Text` AS `Front Head Room`
1+
SELECT m.`Model Year`, d.`Division Name` , m.`Model Name` , m.`Model ID`, s.`Style Name`, s.`Style ID`, s.`MSRP`, ts7.`Text` AS `EPA Classification`, ts256.`Text` AS `Front Head Room`
2
3-
FROM Divisions d, Styles s, Models m, TechSpecs as ts7, TechSpecs as ts256
3+
FROM Models m
4
5-
WHERE m.`Division ID` = d.`Division ID`
5+
JOIN Divisions d ON (d.`Division ID` = m.`Division ID`)
6-
AND m.`Model ID` = s.`Model ID`
6+
7-
AND ts7.`Title ID` = 7
7+
JOIN Styles s ON (s.`Model ID` = m.`Model ID`)
8-
AND ts256.`Title ID` = 256
8+
9-
AND s.`Sequence` = 0
9+
JOIN TechSpecs ts7 ON (ts7.`Title ID` = 7)
10
11
JOIN TechSpecs ts256 ON (ts7.`Title ID` = 256)
12
13
WHERE ts7.Sequence = 0 AND ts256.Sequence = 0