sas那个石家庄人 发表于 2015-6-17 10:33 
data one;
input id $ type $ month;
cards;
我改用SQL写了
PROC SQL;
CREATE TABLE CUS2 AS
SELECT distinct(id),sum(loan_amt) as loan_amt_total,sex,age,count(*) where TYPE in ("ABC" "DEF") as count
from CUS1
GROUP BY id;
QUIT;
SAS提示有错误,应该是count(*) where TYPE in ("ABC" "DEF") as count这句有问题
我是想按ID加总TYPE为"ABC" 和"DEF"的总和 不知道怎么改