select
todouhuken_code,count(s.motorcycle_no) as cnt
from
search_motorcycle s left join
mst_model_v2 v2 on s.motorcycle_model_code = v2.model_code and s.motorcycle_maker_code = v2.model_maker_code,
mst_todouhuken t left join
search_motorcycle sm on sm.dealer_todouhuken_code = t.todouhuken_code
where
s.motorcycle_jyoukyo in (1,5,6) and
model_maker_code = 4 and
sm.dealer_todouhuken_code > 0
group by sm.dealer_todouhuken_code,t.todouhuken_code asc