楼主: belindade
15167 56

[学习分享] Aug 4 2015北美SAS ADV 98%最强机经   [推广有奖]

51
黎明前的。 学生认证  发表于 2016-5-29 19:31:14 |只看作者 |坛友微信交流群
楼主,你第一道题里select 后面的column 之间要加逗号哦

使用道具

52
gdlv 发表于 2016-5-30 06:50:31 来自手机 |只看作者 |坛友微信交流群
谢谢楼主,先mark一下。前天刚100%过了base,下个月的目标advance

使用道具

53
lovedieer 发表于 2016-10-27 02:42:16 |只看作者 |坛友微信交流群
yangqin4587 发表于 2016-1-16 10:19
一道新题
left join and in-line view
Product
15         Proc sql;
16           Select p.product, s.totalsales
17            From product as p
18                         left join (select sum(sales) as totalsales from sales as s)
19                         on p.product_id=s.product_id;
ERROR: Column totalsales could not be found in the table/view identified with the correlation name S.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.

if i remove the s. from s.totalsale,

15         Proc sql;
16           Select p.product, totalsales
17            From product as p
18                         left join (select sum(sales) as totalsales from sales as s)
19                         on p.product_id=s.product_id;
NOTE: The query requires remerging summary statistics back with the original data.
and output is :
product totalsales
1001 800
1001 800
1001 800
1002 .
1003 800
1003 800

any ideas?

使用道具

54
beini0402 发表于 2016-10-31 10:18:14 |只看作者 |坛友微信交流群
谢谢楼主~~

使用道具

55
yajings 发表于 2017-5-21 22:15:05 |只看作者 |坛友微信交流群
多谢您的分享

使用道具

56
By329 发表于 2017-9-7 03:01:54 |只看作者 |坛友微信交流群
多谢楼主

使用道具

57
YoYoCALu 发表于 2018-1-12 02:21:38 |只看作者 |坛友微信交流群
lovedieer 发表于 2016-10-27 02:42
15         Proc sql;
16           Select p.product, s.totalsales
17            From product as p ...
我跑出来也是这个结果,不知您在考试的时候有没有遇到类似的题目呢?

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-25 20:43