BookmarkSubscribeRSS Feed
ashkum
Calcite | Level 5

 

data table_b;
infile datalines;
input std_id$ physics_mark;
datalines;
s001 73
s003 65
s004 52
s006 76
;
run;

 

I have to create new table which shows that maximum marks i.e only one observation so in that case soo6 has maximum marks. how do i use proc sql to find maximum marks.

2 REPLIES 2
singhsahab
Lapis Lazuli | Level 10

Here you can go...

 

proc sql;
create table want as select * from table_b h where 0= (select count(physics_mark) from table_b h1 where h.physics_mark< h1.physics_mark);
quit;