Hello, I want to calculate the maximum of a column by group (ID) and save it in a new column. So my Data is: ID X 1 4 1 3 1 2 2 1 2 5 And I want to have: ID X max_X 1 4 4 1 3 4 1 2 4 2 1 5 2 5 5 I tried: proc sql; create table work.max as select id as id, max(X) as max_X from work.data group by id; quit; But if I tried this I just get: ID X max_X 1 4 4 2 5 5 I hope somebody have a nice idea to solve my problem! Thank you in advance! Lea
... View more