NISSAN X-TRAIL
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 ='x-trail' AND KAT.HYOJIFLG = 1 ORDER BY NENSHIKIFR,NENSHIKITO, MC,GRADE
Array
(
[x-trail_t30_1] => Array
(
[NAME] => T30
[NAMEEN] => T30
[SHANAMEEN] => X-TRAIL
[ORDER] => 90
[GRADE] => 全車対応
[MC] => MC前
[MODELYEAR] => '00/10-'07/08
[YEAR] => '00/10-'02/10
[COUNT] => 0
)
[x-trail_t30_2] => Array
(
[NAME] => T30
[NAMEEN] => T30
[SHANAMEEN] => X-TRAIL
[ORDER] => 90
[GRADE] => 全車対応
[MC] => MC後
[MODELYEAR] => '00/10-'07/08
[YEAR] => '02/10-'07/08
[COUNT] => 1
)
[x-trail_t31_1] => Array
(
[NAME] => T31
[NAMEEN] => T31
[SHANAMEEN] => X-TRAIL
[ORDER] => 90
[GRADE] => 全車対応
[MC] => MC前
[MODELYEAR] => '07/08-'13/12
[YEAR] => '07/08-'10/07
[COUNT] => 2
)
[x-trail_t31_2] => Array
(
[NAME] => T31
[NAMEEN] => T31
[SHANAMEEN] => X-TRAIL
[ORDER] => 90
[GRADE] => 全車対応
[MC] => MC後
[MODELYEAR] => '07/08-'13/12
[YEAR] => '10/07-'13/12
[COUNT] => 3
)
[x-trail_t32_1] => Array
(
[NAME] => T32
[NAMEEN] => T32
[SHANAMEEN] => X-TRAIL
[ORDER] => 90
[GRADE] => 全車対応
[MC] => MC前
[MODELYEAR] => '13/12-
[YEAR] => '13/12-'17/06
[COUNT] => 4
)
[x-trail_t32_2] => Array
(
[NAME] => T32
[NAMEEN] => T32
[SHANAMEEN] => X-TRAIL
[ORDER] => 90
[GRADE] => 全車対応
[MC] => MC後
[MODELYEAR] => '13/12-
[YEAR] => '17/06-
[COUNT] => 5
)
)
T30 '00/10-'07/08
T31 '07/08-'13/12
T32 '13/12-