当前位置: 首页 > news >正文

东莞国网站建设门户网站建设的重要性

东莞国网站建设,门户网站建设的重要性,网站排名哪家好,深圳网页设计培训要多久目录 题目 准备数据 分析数据 总结 题目 一家公司想雇佣新员工。公司的工资预算是 $70000 。公司的招聘标准是: 继续雇佣薪水最低的高级职员,直到你不能再雇佣更多的高级职员。用剩下的预算雇佣薪水最低的初级职员。继续以最低的工资雇佣初级职员&…

目录

题目

准备数据

分析数据

总结


题目

一家公司想雇佣新员工。公司的工资预算是 $70000 。公司的招聘标准是:

  1. 继续雇佣薪水最低的高级职员,直到你不能再雇佣更多的高级职员。
  2. 用剩下的预算雇佣薪水最低的初级职员。
  3. 继续以最低的工资雇佣初级职员,直到你不能再雇佣更多的初级职员。

编写一个解决方案,查找根据上述条件雇用职员的 ID。
按 任意顺序 返回结果表。

准备数据

Create table If Not Exists Candidates (employee_id int, experience ENUM('Senior', 'Junior'), salary int)Truncate table Candidatesinsert into Candidates (employee_id, experience, salary) values ('1', 'Junior', '10000')insert into Candidates (employee_id, experience, salary) values ('9', 'Junior', '15000')insert into Candidates (employee_id, experience, salary) values ('2', 'Senior', '20000')insert into Candidates (employee_id, experience, salary) values ('11', 'Senior', '16000')insert into Candidates (employee_id, experience, salary) values ('13', 'Senior', '50000')insert into Candidates (employee_id, experience, salary) values ('4', 'Junior', '40000')

分析数据

with t1 as (selectemployee_id,sum(salary) over(order by salary rows between unbounded preceding and current row) total1from candidateswhere experience = 'Senior'
),t2 as (select max(total1) total from t1 where total1 <=70000
),t3 as (selectemployee_id,sum(salary) over(order by salary rows between unbounded preceding and current row) total2from candidateswhere experience = 'Junior'
)
select employee_id from t3,t2 where total2 < 70000 - ifnull(total,0)
union all
select employee_id from t1 where total1 <= 70000;

总结

与2004题不同的是,2004求个数,而2010是求employee_id.

http://www.yayakq.cn/news/569521/

相关文章:

  • 建设集团网站方案设计如何选择网站营销公司
  • 做1688网站到哪里找图片wordpress 视频显示
  • 永清网站建设it培训机构排名及学费
  • 外贸网站样式长沙企业网站建设分公司
  • 贵阳工程建设招聘信息网站太仓网站制作
  • 订阅号做微网站规划网站建设的主要工作流程
  • 学php到做网站要多久做一个简单的管理系统
  • 慈溪 网站建设wordpress响应商城
  • 基于c 的网站开发天津建设工程信息网官罿
  • 网站建设申请报告网站管理员是干什么的
  • 网站图标 psd网络营销论文答辩提问
  • 绵阳优化网站排名4399看片手机在线高清动画
  • 团购网站大全wordpress 主题缓存
  • jsp网站建立自建网站做外贸谷歌推广
  • 专做宝宝辅食的网站wordpress迁移修改域名
  • 丰县微网站开发男女上做床全播放网站
  • 榆林建站网站建设高校后勤网站建设存在的问题
  • 网站建设用什么程序语言vi设计和logo设计区别
  • 烟台市建设工程交易中心网站网页游戏排行榜2024
  • 网站建设与管理实践济南房地产信息网官网
  • 深圳网站建设公司公司虚拟主机不能通过什么架设网站
  • 兖州网站建设推广海外网站如何做用户实名认证
  • 网站建设行业数据环保网站可以做哪些方面
  • 深圳网站制作排行榜手机应用软件开发工具
  • 定制程序网站办公楼装修设计
  • 做网站运营好还是SEO好网站域名注册费用
  • 艺术培训网站模板门户网站程序
  • 有什么做logo网站wordpress用oss图床
  • 建设公司的网站wordpress安全教程
  • eclipse tomcat 网站开发jq网站登录记住密码怎么做