Re: [問題] SAS資料處理

看板Statistics作者 (a15321)時間15年前 (2009/02/24 12:33), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串14/19 (看更多)
※ 引述《liton (歐吉桑留學生)》之銘言: : Proc Sql; : create table group as : select group, type : from source : where group in : (select group, count(distinct type) from source : group by group : having count(distinct type)>1); : quit; : 你很多類似問題.. : 建議你買本入門的SQL 感謝,但我跑出來是錯誤訊息 @@ ERROR: A subquery cannot select more than one column. ERROR: A Composite expression (usually a subquery) is used incorrectly in an expression. 馬上google惡補了一下一些基礎 請問這段如果改成這樣會是一樣嗎 PROC SQL; CREATE TABLE new AS SELECT group, type, COUNT(DISTINCT type) FROM source GROUP by group HAVING COUNT(DISTINCT type)>1; quit; -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.150.51
文章代碼(AID): #19etXzXl (Statistics)
討論串 (同標題文章)
文章代碼(AID): #19etXzXl (Statistics)