LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 31 Mar 2008 00:07:12 -0700
Reply-To:     Tjebbe <tjebbewitteveen@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Tjebbe <tjebbewitteveen@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: how to count how many different observations in one dataset
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

On 31 mrt, 04:51, Bestwishes <irain...@gmail.com> wrote: > Dataset1 > > Name ID Gender > Jack 20 M > Mike 30 M > Mary 40 F > Mike 30 M > Mike 30 M > Mike 30 M > Mike 30 M > Jack 20 M > Jack 20 M > Mike 30 M > Mary 40 F > Jack 20 M > Mike 30 M > Mary 40 F > > SAS may return 14 observations for this dataset. However, how to count > how many un-duplicated observation for the variable Name (only 3 > different names)? > > Thanks! Hi,

for example.

proc sql; create table temp as select count(distinct(a.name)) as number from dataset1 as a; quit;

regards, Tjebbe


Back to: Top of message | Previous page | Main SAS-L page