标题:呜呜,大神们来帮我看道SQL问题啊~~
只看楼主
littlejessie
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2011-6-11
 问题点数:0 回复次数:0 
呜呜,大神们来帮我看道SQL问题啊~~
table store
store_id       city                space
wh1           new yourk        370
wh2           beijing              500
wh3           new york           200
wh4           london               400

table employee
store_id           emp_id           salary
wh1                    e1                 1220
wh1                    e3                 1210
wh2                    e4                 1250
wh2                    e6                  1230
wh3                    e7                 1300
wh3                    e8                  1240
wh4                    e9                  1350
wh4                    e11                1280

question1:get the employees who are paid the max salary for each city.(can create temporary tables)

quetion2:get the total salary,the total space,the number of store,the number of employee and maximum salary of every city.show the results as following layout.(can create temorary tables)

City    Tot.Salary    Tot.Space    #store    #employee    Max Salary
...          ...         ...        ...         ...           ...
搜索更多相关主题的帖子: beijing 
2011-06-11 20:35



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-342521-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.279065 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved