lovexialulu 发表于 2016-11-23 22:48 
proc sql noprint;
create table bbb as
select distinct id,trt,count( case when x in (3 4) ...
proc sql noprint;
create table bbb as
select distinct id,trt,count( case when x in (3 4) then id else . end) as tag
from aaa group by id
,trt order by id
,trt;
quit;
程序缺了两个逗号。
但结果和我的要求不一样