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 LEFT OUTER JOIN M_JYOKEN JYO ON JYO.MAKCODE = KAT.MAKCODE AND JYO.SHACODE = KAT.SHACODE AND JYO.KATCODE = KAT.KATCODE LEFT OUTER JOIN M_SHOHINGRP GRP ON JYO.GRPCODE = GRP.GRPCODE WHERE SHA.URLNAME ='vellfire' AND GRP.BRACODE = '11' AND KAT.HYOJIFLG = 1 ORDER BY NENSHIKIFR,NENSHIKITO, MC,GRADE
Array
(
[vellfire_20series_1] => Array
(
[NAME] => 20系
[NAMEEN] => 20series
[SHANAMEEN] => VELLFIRE
[ORDER] => 0
[GRADE] => V,X
[MC] => MC前
[MODELYEAR] => '08/05-'15/01
[YEAR] => '08/05-'11/11
[COUNT] => 9
)
[vellfire_20series_3] => Array
(
[NAME] => 20系
[NAMEEN] => 20series
[SHANAMEEN] => VELLFIRE
[ORDER] => 0
[GRADE] => Z
[MC] => MC前
[MODELYEAR] => '08/05-'15/01
[YEAR] => '08/05-'11/11
[COUNT] => 19
)
[vellfire_20series_2] => Array
(
[NAME] => 20系
[NAMEEN] => 20series
[SHANAMEEN] => VELLFIRE
[ORDER] => 0
[GRADE] => V,X
[MC] => MC後
[MODELYEAR] => '08/05-'15/01
[YEAR] => '11/11-'15/01
[COUNT] => 29
)
[vellfire_20series_4] => Array
(
[NAME] => 20系
[NAMEEN] => 20series
[SHANAMEEN] => VELLFIRE
[ORDER] => 27
[GRADE] => ZR,Z
[MC] => MC後
[MODELYEAR] => '08/05-'15/01
[YEAR] => '11/11-'15/01
[COUNT] => 39
)
[vellfire_30series_1] => Array
(
[NAME] => 30系
[NAMEEN] => 30series
[SHANAMEEN] => VELLFIRE
[ORDER] => 28
[GRADE] => ExecutiveLounge,V,X,VL
[MC] => MC前
[MODELYEAR] => '15/01-
[YEAR] => '15/01-'18/01
[COUNT] => 44
)
[vellfire_30series_2] => Array
(
[NAME] => 30系
[NAMEEN] => 30series
[SHANAMEEN] => VELLFIRE
[ORDER] => 27
[GRADE] => ZR,ZA,Z
[MC] => MC前
[MODELYEAR] => '15/01-
[YEAR] => '15/01-'18/01
[COUNT] => 49
)
[vellfire_30series_3] => Array
(
[NAME] => 30系
[NAMEEN] => 30series
[SHANAMEEN] => VELLFIRE
[ORDER] => 0
[GRADE] => ExecutiveLounge,V,X,VL
[MC] => MC後
[MODELYEAR] => '15/01-
[YEAR] => '18/01-
[COUNT] => 50
)
[vellfire_30series_4] => Array
(
[NAME] => 30系
[NAMEEN] => 30series
[SHANAMEEN] => VELLFIRE
[ORDER] => 0
[GRADE] => ZR,ZA,Z
[MC] => MC後
[MODELYEAR] => '15/01-
[YEAR] => '18/01-
[COUNT] => 51
)
)
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