You are asking to extract and sum "games for a specific year and specific platform and sum up sales".
To extract specific info use where. Your macro should look like:
%MACRO sorting(Year, Platform);
proc sql;
create table want4 as
select Name,Platform, Year,
sum(NA_Sales, JP_Sales, Other_Sales) as suma
from games (where=(Year=&year and Platform=&palatform))
group by Year, Platform /* probably not needed as one group selected */
order by calculated suma; /* desc ?? you did not select this variable */
quit;
run;
%mend;
%sorting(2010,"PS3")
... View more