DAIHATSU TANTO
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 ='tanto' AND KAT.HYOJIFLG = 1 ORDER BY NENSHIKIFR,NENSHIKITO, MC,GRADE
Array
(
[tanto_l375s_1] => Array
(
[NAME] => L375S/L385S
[NAMEEN] => L375S/L385S
[SHANAMEEN] => TANTO
[ORDER] => 60
[GRADE] => X,L
[MC] =>
[MODELYEAR] => '07/12-'13/10
[YEAR] => '07/12-'13/10
[COUNT] => 0
)
[tanto_la600s_1] => Array
(
[NAME] => LA600S/LA610S
[NAMEEN] => LA600S/LA610S
[SHANAMEEN] => TANTO
[ORDER] => 60
[GRADE] => 全車対応
[MC] => MC前
[MODELYEAR] => '13/10-'19/07
[YEAR] => '13/10-'15/12
[COUNT] => 1
)
[tanto_la600s_2] => Array
(
[NAME] => LA600S/LA610S
[NAMEEN] => LA600S/LA610S
[SHANAMEEN] => TANTO
[ORDER] => 60
[GRADE] => 全車対応
[MC] => MC後
[MODELYEAR] => '13/10-'19/07
[YEAR] => '15/12-'19/07
[COUNT] => 2
)
[tanto_la650s_1] => Array
(
[NAME] => LA650S/LA660S
[NAMEEN] => LA650S/LA660S
[SHANAMEEN] => TANTO
[ORDER] => 60
[GRADE] => 全車対応
[MC] =>
[MODELYEAR] => '19/07-
[YEAR] => '19/07-
[COUNT] => 3
)
)
L375S/L385S '07/12-'13/10
LA600S/LA610S '13/10-'19/07
LA650S/LA660S '19/07-