select telco,count(telco) as count,datediff(day,'2012-05-15',left(adate,8)) as arrayNo
from platform.dbo.akn_outgoing_log
where resp_status=2 and adate>'20120515' and adate<'20120521'
and telco in(0011,0003,0001)
group by telco,datediff(day,'2012-05-15',left(adate,8)) order by telco,arrayNo