一道面试题,看看这题咋做,SQL题

图片说明

2个回答

select p.Name,t.Education,max(t.Point),cast(avg(t.Point) as decimal(18,2)) from Test t left join Position p on t.PositionID = p.PositionID
where (p.Name='开发工程师' or p.Name='产品助理') and (t.Education='本科' or t.Education = '硕士') order by p.Name,p.Education

select p.Name,t.Education,max(t.Point),avg(t.Point)
from Test as t left join Position as p using(PositionID)
where (p.Name='开发工程师' or p.Name='产品助理') and (t.Education='本科' or t.Education = '硕士')
order by p.Name desc,t.Education desc

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!