select *
from ta
order by type asc