请问这几句SQL语句该如何写

请教这几句SQL语句该怎么写
有一张电话费用表:
tel_no  cost
13800000000   38
13823400000   56
13800056400   88
13800230000   28
13802300000   18
13822220000   68
13844400000   98
13833330000   35
13822220000   31
13811110000   32

其中
13800000000 
13823400000  
13800056400   
13800230000   
13802300000为行政部的号码,13822220000  13844400000为财务部的电话号码,13833330000 
13822220000 13811110000 为销售部的号码, 我想对这张表进行分组得出下表:
电话号码  部门  费用
13800000000  行政部  38
13823400000  行政部  56
13800056400  行政部 88
13800230000  行政部 28
13802300000  行政部 18
13822220000  财务部 68
13844400000  财务部 98
13833330000  销售部 35
13822220000  销售部 31
13811110000  销售部 32

------解决方案--------------------
create table 电话费用表(tel_no varchar(30),  cost int)

insert into 电话费用表
select '13800000000'   ,38 union all
select '13823400000'   ,56 union all
select '13800056400'   ,88 union all
select '13800230000'   ,28 union all
select '13802300000'   ,18 union all
select '13822220000'   ,68 union all
select '13844400000'   ,98 union all
select '13833330000'   ,35 union all
select '13822220000'   ,31 union all
select '13811110000'   ,32
go

select tel_no as 电话号码,
       case when tel_no in ('13800000000','13823400000','13800056400','13800230000','13802300000')
                 then '行政部'
            when tel_no in ('13822220000','13844400000')
                 then '财务部'
            when tel_no in ('13833330000','13822220000','13811110000')
                 then '销售部'   
       end as 部门 , 
       cost as 费用
from 电话费用表
/*
电话号码 部门 费用
13800000000 行政部 38
13823400000 行政部 56
13800056400 行政部 88
13800230000 行政部 28
13802300000 行政部 18
13822220000 财务部 68
13844400000 财务部 98
13833330000 销售部 35
13822220000 财务部 31
13811110000 销售部 32
*/

------解决方案--------------------
最好建立一个字典表或者关联表,不然你的分类多了case when会死人的
------解决方案--------------------
对你们的系统进行优化,新增一张电话部门表,存储部门中的电话,表的字段包含
dept_id tel_no

然后查询SQL

select b.dept_id,a.tel_no,SUM(a.cost) as total_cost from [电话费用表] a
inner join [部门电话表] b
on a.tel_no = b.tel_no
group by b.dept_id,a.tel_no

如果要显示部门名称再关联部门表


------解决方案--------------------
不要用case when了,人数多的话,真的会要命的。。。建议使用三楼的算法,新增一张电话部门的表,然后语句就随便写写就可以了