You seem to want to order the specialties by the total of doctors in them. The query needs to calculate this value before doing the ordering:
select t.visitty, t.specialty, t.doctors
from table t join
(select specialty, sum(doctors) as numdoctors
from table t
group by specialty
) tsum
on t.specialty = tsum.specialty
order by tsum.doctors desc, tsum.specialty, t.doctors desc;