Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

calculate the sum of value using only DATA STEP.
data count_;
input year name $ value;
cards;
2006 xxx 10
2007 yyy 12
2006 xxx 20
2008 yyy 15
2007 xxx 15
;

out put should be like this
year name T_value
-----------------------
2006 xxx 30
2007 xxx 15
2007 yyy 12
2008 xxx 15

Answer Posted / xxx

here i can write the code using PROC SQL;
plz ans in DATA STEP;

proc sql;
select year,name, sum(value)as T_value from count_ group by
year, name having sum(value) order by name;
quit;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

describe about physical data integration? : Sas-di

1045


How to sort in descending order?

1257


What is the difference between where and if statement?

1113


Name few SAS functions?

1095


I have 3 years of work experience at a startup and recently got certified in Data Science with SAS. I need to know how to get into the analytics industry

1758


What does P-value signify about the statistical data?

1363


hi all, I need the SAS DI DUMP(A00 260) for attending the certification. if any one have, pls provide it.Please Email to vrpotluri@hotmail.com. Thanks - Ramana

5449


How can I remove header from output data set?

2621


How to limit decimal places for the variable using proc means?

1068


What is the general format of function in sas? : sas-grid-administration

973


Explain bmdp procedure?

1033


Explain proc sort?

1106


what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming

1079


name some data transformation used in sas di? : Sas-di

972


How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro

1047