select date_format(ok.CREATED_DT,'%Y-%m-%d'),count(*)sql
from ord_rkd okide
where ok.CREATED_DT BETWEEN '2014-07-02' and '2015-08-03'orm
group by date_format(ok.CREATED_DT,'%Y-%m-%d');it