TOYOTA VELLFIRE
SQL
SELECT * , KAT.URLNAME AS KATURLNAME FROM M_KATASHIKI KAT LEFT OUTER JOIN M_SHASHU SHA ON SHA.SHACODE = KAT.SHACODE AND SHA.MAKCODE = KAT.MAKCODE LEFT OUTER JOIN ( SELECT MAKCODE , SHACODE ,KATNAME AS KATNAME1 , MIN(NENSHIKIFR) AS FROMOLD, MAX(NENSHIKIFR) AS FROMNEW, MIN(NENSHIKITO) AS TOOLD, MAX(NENSHIKITO) AS TONEW FROM M_KATASHIKI KAT WHERE KAT.HYOJIFLG = 1 GROUP BY MAKCODE, SHACODE, KATNAME1 ) kts ON kts.MAKCODE= KAT.MAKCODE AND kts.SHACODE= KAT.SHACODE AND kts.KATNAME1= KAT.KATNAME WHERE SHA.URLNAME ='vellfire' AND KAT.HYOJIFLG = 1 ORDER BY NENSHIKIFR,NENSHIKITO, MC,GRADE
Array
(
[vellfire_20series_1] => Array
(
[NAME] => 20系
[NAMEEN] => 20series
[SHANAMEEN] => VELLFIRE
[ORDER] => 90
[GRADE] => V,X
[MC] => MC前
[MODELYEAR] => '08/05-'15/01
[YEAR] => '08/05-'11/11
[COUNT] => 0
)
[vellfire_20series_3] => Array
(
[NAME] => 20系
[NAMEEN] => 20series
[SHANAMEEN] => VELLFIRE
[ORDER] => 90
[GRADE] => Z
[MC] => MC前
[MODELYEAR] => '08/05-'15/01
[YEAR] => '08/05-'11/11
[COUNT] => 1
)
[vellfire_20series_2] => Array
(
[NAME] => 20系
[NAMEEN] => 20series
[SHANAMEEN] => VELLFIRE
[ORDER] => 90
[GRADE] => V,X
[MC] => MC後
[MODELYEAR] => '08/05-'15/01
[YEAR] => '11/11-'15/01
[COUNT] => 2
)
[vellfire_20series_4] => Array
(
[NAME] => 20系
[NAMEEN] => 20series
[SHANAMEEN] => VELLFIRE
[ORDER] => 90
[GRADE] => ZR,Z
[MC] => MC後
[MODELYEAR] => '08/05-'15/01
[YEAR] => '11/11-'15/01
[COUNT] => 3
)
[vellfire_30series_1] => Array
(
[NAME] => 30系
[NAMEEN] => 30series
[SHANAMEEN] => VELLFIRE
[ORDER] => 90
[GRADE] => ExecutiveLounge,V,X,VL
[MC] => MC前
[MODELYEAR] => '15/01-
[YEAR] => '15/01-'18/01
[COUNT] => 4
)
[vellfire_30series_2] => Array
(
[NAME] => 30系
[NAMEEN] => 30series
[SHANAMEEN] => VELLFIRE
[ORDER] => 90
[GRADE] => ZR,ZA,Z
[MC] => MC前
[MODELYEAR] => '15/01-
[YEAR] => '15/01-'18/01
[COUNT] => 5
)
[vellfire_30series_3] => Array
(
[NAME] => 30系
[NAMEEN] => 30series
[SHANAMEEN] => VELLFIRE
[ORDER] => 90
[GRADE] => ExecutiveLounge,V,X,VL
[MC] => MC後
[MODELYEAR] => '15/01-
[YEAR] => '18/01-
[COUNT] => 6
)
[vellfire_30series_4] => Array
(
[NAME] => 30系
[NAMEEN] => 30series
[SHANAMEEN] => VELLFIRE
[ORDER] => 90
[GRADE] => ZR,ZA,Z
[MC] => MC後
[MODELYEAR] => '15/01-
[YEAR] => '18/01-
[COUNT] => 7
)
)
20系 '08/05-'15/01
30系 '15/01-
-
VELLFIRE 30系 MC前
'15/01-'18/01
ExecutiveLounge,V,X,VL
-
VELLFIRE 30系 MC前
'15/01-'18/01
ZR,ZA,Z
-
VELLFIRE 30系 MC後
'18/01-
ExecutiveLounge,V,X,VL
-
VELLFIRE 30系 MC後
'18/01-
ZR,ZA,Z