sql statement Exercise: Find City store where the average wage is less than 5000

Employee information table employee: user_id, name, store_id, salary

Store Table 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




Guess you like

Origin www.cnblogs.com/testertechnology/p/10980940.html