楼主: belindade
16784 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
拉您进交流群
GMT+8, 2026-1-8 16:04