create table a(type int,pblTime datetime)
insert into a
select 2,'2013-12-15' union all
select 1,'2013-12-16' union all
select 5,'2013-12-16' union all
select 1,'2013-12-17' union all
select 5,'2013-12-18'
select type,pblTime
from
(
select *,
MAX(pblTime) over(partition by type) max_pblTime
from a
)t
order by max_pblTime desc,type ,pblTime desc
/*
type pblTime
5 2013-12-18 00:00:00.000
5 2013-12-16 00:00:00.000
1 2013-12-17 00:00:00.000
1 2013-12-16 00:00:00.000
2 2013-12-15 00:00:00.000
*/
select * from a b
order by (select max(pbltime) from a
where b.type=type)desc,pbltime desc