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:         Sun, 30 Mar 2008 23:38:19 +0530
Reply-To:     ajay ohri <ohri2007@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         ajay ohri <ohri2007@GMAIL.COM>
Subject:      Re: need to summarise
Comments: To: mohit.b.bhatia@aexp.com
In-Reply-To:  <OF333F48E6.1AF259DD-ON6525741C.006119DC-6525741C.0061AB39@aexp.com>
Content-Type: text/plain; charset=ISO-8859-1

try this

proc means data= dataset1 sum ; class id; var indicator; quit;

or proc sql; create table test1 as select id, sum(indicator) as summ from dataset1 group by id; quit;

HTH

2008/3/30 Mohit Bhatia <mohit.b.bhatia@aexp.com>:

> Hi > > I need to summarise data as follow > > My original data looks like > > id indicator > aa 0 > aa 1 > aa 1 > bb 0 > cc 1 > cc 0 > > my final output should look like > > id sum > aa 2 > bb 0 > cc 1 > > Kindly help > > American Express made the following annotations on Sun Mar 30 2008 > 10:46:52 > > ------------------------------------------------------------------------------ > "This message and any attachments are solely for the intended recipient > and may contain confidential or privileged information. If you are not the > intended recipient, any disclosure, copying, use, or distribution of the > information included in this message and any attachments is prohibited. If > you have received this communication in error, please notify us by reply > e-mail and immediately and permanently delete this message and any > attachments. Thank you." > > American Express a ajouté le commentaire suivant le Sun Mar 30 2008 > 10:46:52 > > Ce courrier et toute pièce jointe qu'il contient sont réservés au seul > destinataire indiqué et peuvent renfermer des renseignements confidentiels > et privilégiés. Si vous n'êtes pas le destinataire prévu, toute divulgation, > duplication, utilisation ou distribution du courrier ou de toute pièce > jointe est interdite. Si vous avez reçu cette communication par erreur, > veuillez nous en aviser par courrier et détruire immédiatement le courrier > et les pièces jointes. Merci. > > ****************************************************************************** > > ------------------------------------------------------------------------------- >


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