首页 > 试题广场 >

如下图是一张途虎养车门店的技师服务评分表A,请用SQL语句实

[问答题]
如下图是一张途虎养车门店的技师服务评分表A,请用SQL语句实现:①查询出分数倒数第一的技师姓名及对应的服务名;②查询出每项服务都大于等于8分的技师姓名

SELECT Employee,sum(score) FROM A group by Employee limit 1;
SELECT Employee FROM A group by Employee having min(score) >= 8;
发表于 2020-12-22 12:25:36 回复(1)
①    select a.姓名,a.服务名  from (select min(Score) as lowest,Employee as 姓名,Service as 服务名 from A) a;
②    select distinct Employee from A where Employee not in (select Employee from A where score < 8);
发表于 2021-11-04 10:46:23 回复(0)
select employee,Service from a order by Score ASC limit 1;
SELECT distinct Employee from a where Score > 8 ORDER BY Service;
发表于 2022-04-02 09:31:11 回复(0)
select  Employee,Service from A  where Score =(select min(Score) from A);
select distinct Employee from A where Score>=8;
发表于 2020-12-24 20:48:46 回复(1)
select employee,service from tabels order by score limit 1 select employee from tables where score&gt;=8
编辑于 2020-12-21 20:24:42 回复(0)