sql语句练习:找出平均工资小于5000的商店所在的城市

员工信息表 employee: user_id , name, store_id, salary

商店表stores:store_id, name,city

 

参考答案:select a.city from stores a,employee b where b.store_id=a.store_id group by b.store_id having avg(b.salary)<5000




posted @ 2019-06-05 17:37  Albert_tester  阅读(491)  评论(0编辑  收藏  举报