Redian新闻
>
先把急用的英语学好了再说。
avatar
先把急用的英语学好了再说。# Parenting - 为人父母
o*y
1
都是面试题。
1. 假设有一TABLE EMP(id, sal, department). 找出所有employees whose
salary more than the average for their RESPECTIVE department.
2. 假设有一TABLE contains goods sold by vendors,GOODS(vendor_id, good_
id). 找出所有vendors who have the same or wider list of goods than vendor
002.
avatar
g*i
2
Language arts: can your kids get 95+ & beat american kids?
avatar
s*e
3
*Solved in SAS;
*Q1;
proc sql;
title1 "ID with average salary"
title2 ">department average";
select id, sal, avg(sal) as avgsalary format=dollar11.2;
from emp
group by department
having sal>avg(sal);
order by id;
quit;
*Q2;
proc sql;
create table lists as select vendor_id, count(good_id) as list from table1
group by vendor_id
quit;
proc sql;
select vendor_id from lists where list>(select list from lists where vendor_
id=002);
quit;
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。