Date: Thu, 8 Jun 2006 22:06:09 +0200
Reply-To: Stéphane Colas <saslist@DATAMETRIC.FR>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Stéphane Colas <saslist@DATAMETRIC.FR>
Subject: Re: Data manupulation
In-Reply-To: <200606081656.k58CjBiC001361@mailgw.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
Is it a joke or is it too late (here...) ?
same proc SQL but add a sum(value2).
--
Stéphane.
http://www.datametric.fr
(translated).
Selon rathindronath <mehedisas@YAHOO.COM>:
> I have adataset as follows where I have two bygroup: 1, 2 and 3. Now I have
> to add teh value of all three.
>
> Given dataset:
> --------------
>
> bygrp Var value value2
>
> 1 abdominal pain 10 2
> 1 abscess 20 3
> 1 accidental injury 5 4
> 1 asthenia 6 5
> 2 abdominal pain 20 1
> 2 abscess 10 2
> 2 accidental injury 5 3
> 2 asthenia 1 4
> 3 abdominal pain 0 4
> 3 abscess 0 3
> 3 accidental injury 0 2
> 3 asthenia 0 1
>
> Result:
> --------
> bygrp Var value value2
>
> 1 abdominal pain 30 7
> 1 abscess 30 8
> 1 accidental injury 10 9
> 1 asthenia 7 10
>