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"的总和,麻烦大神们帮忙看下??