what is the average salary for all teams?
select avg ( salary ) from salary
please give me the name. Yes!
select t1.name from team as t1 join salary as t2 on t1.team_id = t2.team_id group by t1.team_id order by avg ( t2.salary ) desc limit 1
Great! How about the lowest salary?
select t1.name from team as t1 join salary as t2 on t1.team_id = t2.team_id group by t1.team_id order by avg ( t2.salary ) asc limit 1