Skip to content

Instantly share code, notes, and snippets.

@lixzhang
Created September 1, 2016 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lixzhang/7d85f61da7933ae194685c3b7f265f94 to your computer and use it in GitHub Desktop.
Save lixzhang/7d85f61da7933ae194685c3b7f265f94 to your computer and use it in GitHub Desktop.
data bank_sum (keep = CardID total_expense) ;
set bank ;
by CardID ;
retain total_expense ;
if first.CardID then total_expense = 0 ;
total_expense = total_expense + Expense ;
if last.CardID ;
run ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment