Date: Wed, 19 Jul 2006 05:18:50 -0700
Reply-To: zee <zeelanshaik@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: zee <zeelanshaik@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: count the number of different observations
In-Reply-To: <1153272652.786299.130600@h48g2000cwc.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"
other way u can do it i.e
data student;
input student year;
cards;
1 2005
1 2006
2 2004
2 2005
2 2006
3 2006
;
run;
proc sort data=student;
by student;
run;
proc sql;
create table student_count as select distinct student from student;
quit;
proc sql;
select count(student) into: student_count from student_count ;
quit;
%put &student_count;
skyline wrote:
> Hello,
>
> I would like to count the number of students in this setup...
>
>
> students year
> 1 2005
> 1 2006
> 2 2004
> 2 2005
> 2 2006
> 3 2006
>
> I will appreciate your commments.
>
> Best regards,