select
count(1) as 总数,
sum(case when left(取货任务规定发布时间,2)*1 <= 12 then 1 else 0 end) as 及时,
sum(case when left(取货任务规定发布时间,2)*1 > 12 then 1 else 0 end ) as 不及时
from tabname where 取货任务发布时间 >='${参数a}' and 取货任务发布时间 <='${参数b}'