VIDEO GAMES DATASET CREATION AND ANALYSIS USING DATA STEP | PROC SQL | PROC MEANS | PROC RANK | PROC SGPLOT WITH DATE FUNCTIONS AND POPULARITY GRADING MACROS
options nocenter;
1) Create dataset using a DATA step (explicit row creation)
data work.video_games;
length Game_Name $40 Genre $15 Platform $12;
format Release_Date yymmdd10.;
informat Release_Date yymmdd10.;
input Game_ID Game_Name :$40. Genre :$15. Release_Date :yymmdd10. Sales_Million
Rating Platform :$12.;
/* Derived variable */
Sales = Sales_Million;
datalines;
1 Monster_Hunter_World ACTION 2018-01-26 20.0 8.5 PS4
2 Zelda_Breath_of_the_Wild ADVENTURE 2017-03-03 25.0 9.7 Nintendo_Switch
3 Minecraft SANDBOX 2011-11-18 200.0 9.0 Multi
4 Among_Us PARTY 2018-06-15 60.0 8.0 Multi
5 God_of_War ACTION 2018-04-20 12.0 9.1 PS4
6 Fortnite BATTLE_ROYALE 2017-07-21 350.0 7.8 Multi
7 The_Witcher_3 RPG 2015-05-19 28.0 9.3 Multi
8 Grand_Theft_Auto_V ACTION 2013-09-17 145.0 9.4 Multi
9 PUBG BATTLE_ROYALE 2017-12-20 70.0 7.5 Multi
10 Animal_Crossing_NEW_HORIZONS SIMULATION 2020-03-20 31.0 8.9 Nintendo_Switch
11 Super_Mario_Odyssey PLATFORM 2017-10-27 20.0 9.2 Nintendo_Switch
12 Halo_Infinite SHOOTER 2021-12-08 6.5 7.0 Xbox
;
run;
proc print data=work.video_games;
run;
OUTPUT:
| Obs | Game_Name | Genre | Platform | Release_Date | Game_ID | Sales_Million | Rating | Sales |
|---|---|---|---|---|---|---|---|---|
| 1 | Monster_Hunter_World | ACTION | PS4 | 2018-01-26 | 1 | 20.0 | 8.5 | 20.0 |
| 2 | Zelda_Breath_of_the_Wild | ADVENTURE | Nintendo_Swi | 2017-03-03 | 2 | 25.0 | 9.7 | 25.0 |
| 3 | Minecraft | SANDBOX | Multi | 2011-11-18 | 3 | 200.0 | 9.0 | 200.0 |
| 4 | Among_Us | PARTY | Multi | 2018-06-15 | 4 | 60.0 | 8.0 | 60.0 |
| 5 | God_of_War | ACTION | PS4 | 2018-04-20 | 5 | 12.0 | 9.1 | 12.0 |
| 6 | Fortnite | BATTLE_ROYALE | Multi | 2017-07-21 | 6 | 350.0 | 7.8 | 350.0 |
| 7 | The_Witcher_3 | RPG | Multi | 2015-05-19 | 7 | 28.0 | 9.3 | 28.0 |
| 8 | Grand_Theft_Auto_V | ACTION | Multi | 2013-09-17 | 8 | 145.0 | 9.4 | 145.0 |
| 9 | PUBG | BATTLE_ROYALE | Multi | 2017-12-20 | 9 | 70.0 | 7.5 | 70.0 |
| 10 | Animal_Crossing_NEW_HORIZONS | SIMULATION | Nintendo_Swi | 2020-03-20 | 10 | 31.0 | 8.9 | 31.0 |
| 11 | Super_Mario_Odyssey | PLATFORM | Nintendo_Swi | 2017-10-27 | 11 | 20.0 | 9.2 | 20.0 |
| 12 | Halo_Infinite | SHOOTER | Xbox | 2021-12-08 | 12 | 6.5 | 7.0 | 6.5 |
2) Same dataset creation using PROC SQL (INSERT SELECT style)
This demonstrates SQL-style creation and the differences to DATA step
proc sql;
create table work.video_games_sql as
select input(put(Release_Date, yymmdd10.), yymmdd10.) as Release_Date format=yymmdd10.,
Game_ID,Game_Name,Genre,Sales_Million as Sales,Rating,Platform
from work.video_games;
quit;
proc print data=work.video_games_sql;
run;
OUTPUT:
| Obs | Release_Date | Game_ID | Game_Name | Genre | Sales | Rating | Platform |
|---|---|---|---|---|---|---|---|
| 1 | 2018-01-26 | 1 | Monster_Hunter_World | ACTION | 20.0 | 8.5 | PS4 |
| 2 | 2017-03-03 | 2 | Zelda_Breath_of_the_Wild | ADVENTURE | 25.0 | 9.7 | Nintendo_Swi |
| 3 | 2011-11-18 | 3 | Minecraft | SANDBOX | 200.0 | 9.0 | Multi |
| 4 | 2018-06-15 | 4 | Among_Us | PARTY | 60.0 | 8.0 | Multi |
| 5 | 2018-04-20 | 5 | God_of_War | ACTION | 12.0 | 9.1 | PS4 |
| 6 | 2017-07-21 | 6 | Fortnite | BATTLE_ROYALE | 350.0 | 7.8 | Multi |
| 7 | 2015-05-19 | 7 | The_Witcher_3 | RPG | 28.0 | 9.3 | Multi |
| 8 | 2013-09-17 | 8 | Grand_Theft_Auto_V | ACTION | 145.0 | 9.4 | Multi |
| 9 | 2017-12-20 | 9 | PUBG | BATTLE_ROYALE | 70.0 | 7.5 | Multi |
| 10 | 2020-03-20 | 10 | Animal_Crossing_NEW_HORIZONS | SIMULATION | 31.0 | 8.9 | Nintendo_Swi |
| 11 | 2017-10-27 | 11 | Super_Mario_Odyssey | PLATFORM | 20.0 | 9.2 | Nintendo_Swi |
| 12 | 2021-12-08 | 12 | Halo_Infinite | SHOOTER | 6.5 | 7.0 | Xbox |
/* Note: In practice above PROC SQL example reads from the DATA step table to
demonstrate an SQL-based transformation. PROC SQL can also insert rows
directly via INSERT INTO ... VALUES but that's verbose for many rows. */
3) Date calculations: age of game (years since release) using INTCK and INTNX
data work.video_games_dates;
set work.video_games;
Today = today();
format Today yymmdd10.;
/* INTCK counting whole boundary crossings (how many year boundaries crossed)
This gives the difference in years but may behave differently across dates */
Age_years_intck = intck('year', Release_Date, Today);
/* INTNX: shift the Release_Date by N years and compare -- precise age with floor
INTNX with 'same' alignment and then compute interval between dates */
/* Compute anniversary date at current year */
anniv_this_year = intnx('year', Release_Date, Age_years_intck, 'same');
/* adjust if anniversary hasn't occurred yet */
if anniv_this_year > Today then Age_years_intnx = Age_years_intck - 1;
else Age_years_intnx = Age_years_intck;
format anniv_this_year yymmdd10.;
run;
proc print data=work.video_games_dates;
run;
OUTPUT:
| Obs | Game_Name | Genre | Platform | Release_Date | Game_ID | Sales_Million | Rating | Sales | Today | Age_years_intck | anniv_this_year | Age_years_intnx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Monster_Hunter_World | ACTION | PS4 | 2018-01-26 | 1 | 20.0 | 8.5 | 20.0 | 2025-12-09 | 7 | 2025-01-26 | 7 |
| 2 | Zelda_Breath_of_the_Wild | ADVENTURE | Nintendo_Swi | 2017-03-03 | 2 | 25.0 | 9.7 | 25.0 | 2025-12-09 | 8 | 2025-03-03 | 8 |
| 3 | Minecraft | SANDBOX | Multi | 2011-11-18 | 3 | 200.0 | 9.0 | 200.0 | 2025-12-09 | 14 | 2025-11-18 | 14 |
| 4 | Among_Us | PARTY | Multi | 2018-06-15 | 4 | 60.0 | 8.0 | 60.0 | 2025-12-09 | 7 | 2025-06-15 | 7 |
| 5 | God_of_War | ACTION | PS4 | 2018-04-20 | 5 | 12.0 | 9.1 | 12.0 | 2025-12-09 | 7 | 2025-04-20 | 7 |
| 6 | Fortnite | BATTLE_ROYALE | Multi | 2017-07-21 | 6 | 350.0 | 7.8 | 350.0 | 2025-12-09 | 8 | 2025-07-21 | 8 |
| 7 | The_Witcher_3 | RPG | Multi | 2015-05-19 | 7 | 28.0 | 9.3 | 28.0 | 2025-12-09 | 10 | 2025-05-19 | 10 |
| 8 | Grand_Theft_Auto_V | ACTION | Multi | 2013-09-17 | 8 | 145.0 | 9.4 | 145.0 | 2025-12-09 | 12 | 2025-09-17 | 12 |
| 9 | PUBG | BATTLE_ROYALE | Multi | 2017-12-20 | 9 | 70.0 | 7.5 | 70.0 | 2025-12-09 | 8 | 2025-12-20 | 7 |
| 10 | Animal_Crossing_NEW_HORIZONS | SIMULATION | Nintendo_Swi | 2020-03-20 | 10 | 31.0 | 8.9 | 31.0 | 2025-12-09 | 5 | 2025-03-20 | 5 |
| 11 | Super_Mario_Odyssey | PLATFORM | Nintendo_Swi | 2017-10-27 | 11 | 20.0 | 9.2 | 20.0 | 2025-12-09 | 8 | 2025-10-27 | 8 |
| 12 | Halo_Infinite | SHOOTER | Xbox | 2021-12-08 | 12 | 6.5 | 7.0 | 6.5 | 2025-12-09 | 4 | 2025-12-08 | 4 |
4) PROC MEANS: Summary statistics on Sales and Rating
proc means data=work.video_games n mean median std min max mindec=2 maxdec=2;
var Sales Rating;
title "Summary statistics for Sales (million) and Rating";
run;
OUTPUT:
The MEANS Procedure
| Variable | N | Mean | Median | Std Dev | Minimum | Maximum |
|---|---|---|---|---|---|---|
Sales Rating | 12 12 | 80.63 8.62 | 29.50 8.95 | 103.30 0.85 | 6.50 7.00 | 350.00 9.70 |
5) PROC RANK: Create ranks by Sales and Rating (descending = highest is rank 1)
proc rank data=work.video_games out=work.video_games_ranked ties=mean descending;
var Sales Rating;
ranks Sales_Rank Rating_Rank;
run;
proc print data=work.video_games_ranked;
run;
OUTPUT:
| Obs | Game_Name | Genre | Platform | Release_Date | Game_ID | Sales_Million | Rating | Sales | Sales_Rank | Rating_Rank |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Monster_Hunter_World | ACTION | PS4 | 2018-01-26 | 1 | 20.0 | 8.5 | 20.0 | 9.5 | 8 |
| 2 | Zelda_Breath_of_the_Wild | ADVENTURE | Nintendo_Swi | 2017-03-03 | 2 | 25.0 | 9.7 | 25.0 | 8.0 | 1 |
| 3 | Minecraft | SANDBOX | Multi | 2011-11-18 | 3 | 200.0 | 9.0 | 200.0 | 2.0 | 6 |
| 4 | Among_Us | PARTY | Multi | 2018-06-15 | 4 | 60.0 | 8.0 | 60.0 | 5.0 | 9 |
| 5 | God_of_War | ACTION | PS4 | 2018-04-20 | 5 | 12.0 | 9.1 | 12.0 | 11.0 | 5 |
| 6 | Fortnite | BATTLE_ROYALE | Multi | 2017-07-21 | 6 | 350.0 | 7.8 | 350.0 | 1.0 | 10 |
| 7 | The_Witcher_3 | RPG | Multi | 2015-05-19 | 7 | 28.0 | 9.3 | 28.0 | 7.0 | 3 |
| 8 | Grand_Theft_Auto_V | ACTION | Multi | 2013-09-17 | 8 | 145.0 | 9.4 | 145.0 | 3.0 | 2 |
| 9 | PUBG | BATTLE_ROYALE | Multi | 2017-12-20 | 9 | 70.0 | 7.5 | 70.0 | 4.0 | 11 |
| 10 | Animal_Crossing_NEW_HORIZONS | SIMULATION | Nintendo_Swi | 2020-03-20 | 10 | 31.0 | 8.9 | 31.0 | 6.0 | 7 |
| 11 | Super_Mario_Odyssey | PLATFORM | Nintendo_Swi | 2017-10-27 | 11 | 20.0 | 9.2 | 20.0 | 9.5 | 4 |
| 12 | Halo_Infinite | SHOOTER | Xbox | 2021-12-08 | 12 | 6.5 | 7.0 | 6.5 | 12.0 | 12 |
6) Macro for popularity grading: combines Sales and Rating into a score
and assigns grades (A, B, C, D).
%macro popularity_grades(indata=work.video_games, outdata=work.video_games_pop);
/* We use PROC SQL to compute normalized score, then DATA step to assign grade */
proc sql;
create table &outdata. as
select *,
/* Normalize Sales and Rating to 0-100 scale using min/max */
(Sales - (select min(Sales) from &indata.)) /
(case when (select max(Sales) from &indata.) - (select min(Sales) from &indata.) = 0
then 1 else (select max(Sales) from &indata.) - (select min(Sales) from &indata.) end) * 70
as Sales_Score,
(Rating - (select min(Rating) from &indata.)) /
(case when (select max(Rating) from &indata.) - (select min(Rating) from &indata.) = 0
then 1 else (select max(Rating) from &indata.) - (select min(Rating) from &indata.) end) * 30
as Rating_Score
from &indata.;
quit;
proc print data=&outdata.;
run;
/* Total score as weighted sum: Sales 70%, Rating 30% */
data &outdata.;
set &outdata.;
Popularity_Score = Sales_Score + Rating_Score; /* 0-100-ish scale */
length Popularity_Grade $1.;
if Popularity_Score >= 80 then Popularity_Grade = 'A';
else if Popularity_Score >= 60 then Popularity_Grade = 'B';
else if Popularity_Score >= 40 then Popularity_Grade = 'C';
else Popularity_Grade = 'D';
run;
proc print data=&outdata.;
run;
/* Provide a quick PROC FREQ to show distribution of grades */
proc freq data=&outdata.;
tables Popularity_Grade / nocum nopercent;
title "Distribution of popularity grades";
run;
%mend popularity_grades;
%popularity_grades(indata=work.video_games, outdata=work.video_games_pop);
OUTPUT:
| Obs | Game_Name | Genre | Platform | Release_Date | Game_ID | Sales_Million | Rating | Sales | Sales_Score | Rating_Score |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Monster_Hunter_World | ACTION | PS4 | 2018-01-26 | 1 | 20.0 | 8.5 | 20.0 | 2.7511 | 16.6667 |
| 2 | Zelda_Breath_of_the_Wild | ADVENTURE | Nintendo_Swi | 2017-03-03 | 2 | 25.0 | 9.7 | 25.0 | 3.7700 | 30.0000 |
| 3 | Minecraft | SANDBOX | Multi | 2011-11-18 | 3 | 200.0 | 9.0 | 200.0 | 39.4323 | 22.2222 |
| 4 | Among_Us | PARTY | Multi | 2018-06-15 | 4 | 60.0 | 8.0 | 60.0 | 10.9025 | 11.1111 |
| 5 | God_of_War | ACTION | PS4 | 2018-04-20 | 5 | 12.0 | 9.1 | 12.0 | 1.1208 | 23.3333 |
| 6 | Fortnite | BATTLE_ROYALE | Multi | 2017-07-21 | 6 | 350.0 | 7.8 | 350.0 | 70.0000 | 8.8889 |
| 7 | The_Witcher_3 | RPG | Multi | 2015-05-19 | 7 | 28.0 | 9.3 | 28.0 | 4.3814 | 25.5556 |
| 8 | Grand_Theft_Auto_V | ACTION | Multi | 2013-09-17 | 8 | 145.0 | 9.4 | 145.0 | 28.2242 | 26.6667 |
| 9 | PUBG | BATTLE_ROYALE | Multi | 2017-12-20 | 9 | 70.0 | 7.5 | 70.0 | 12.9403 | 5.5556 |
| 10 | Animal_Crossing_NEW_HORIZONS | SIMULATION | Nintendo_Swi | 2020-03-20 | 10 | 31.0 | 8.9 | 31.0 | 4.9927 | 21.1111 |
| 11 | Super_Mario_Odyssey | PLATFORM | Nintendo_Swi | 2017-10-27 | 11 | 20.0 | 9.2 | 20.0 | 2.7511 | 24.4444 |
| 12 | Halo_Infinite | SHOOTER | Xbox | 2021-12-08 | 12 | 6.5 | 7.0 | 6.5 | 0.0000 | 0.0000 |
| Obs | Game_Name | Genre | Platform | Release_Date | Game_ID | Sales_Million | Rating | Sales | Sales_Score | Rating_Score | Popularity_Score | Popularity_Grade |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Monster_Hunter_World | ACTION | PS4 | 2018-01-26 | 1 | 20.0 | 8.5 | 20.0 | 2.7511 | 16.6667 | 19.4178 | D |
| 2 | Zelda_Breath_of_the_Wild | ADVENTURE | Nintendo_Swi | 2017-03-03 | 2 | 25.0 | 9.7 | 25.0 | 3.7700 | 30.0000 | 33.7700 | D |
| 3 | Minecraft | SANDBOX | Multi | 2011-11-18 | 3 | 200.0 | 9.0 | 200.0 | 39.4323 | 22.2222 | 61.6545 | B |
| 4 | Among_Us | PARTY | Multi | 2018-06-15 | 4 | 60.0 | 8.0 | 60.0 | 10.9025 | 11.1111 | 22.0136 | D |
| 5 | God_of_War | ACTION | PS4 | 2018-04-20 | 5 | 12.0 | 9.1 | 12.0 | 1.1208 | 23.3333 | 24.4541 | D |
| 6 | Fortnite | BATTLE_ROYALE | Multi | 2017-07-21 | 6 | 350.0 | 7.8 | 350.0 | 70.0000 | 8.8889 | 78.8889 | B |
| 7 | The_Witcher_3 | RPG | Multi | 2015-05-19 | 7 | 28.0 | 9.3 | 28.0 | 4.3814 | 25.5556 | 29.9369 | D |
| 8 | Grand_Theft_Auto_V | ACTION | Multi | 2013-09-17 | 8 | 145.0 | 9.4 | 145.0 | 28.2242 | 26.6667 | 54.8908 | C |
| 9 | PUBG | BATTLE_ROYALE | Multi | 2017-12-20 | 9 | 70.0 | 7.5 | 70.0 | 12.9403 | 5.5556 | 18.4959 | D |
| 10 | Animal_Crossing_NEW_HORIZONS | SIMULATION | Nintendo_Swi | 2020-03-20 | 10 | 31.0 | 8.9 | 31.0 | 4.9927 | 21.1111 | 26.1038 | D |
| 11 | Super_Mario_Odyssey | PLATFORM | Nintendo_Swi | 2017-10-27 | 11 | 20.0 | 9.2 | 20.0 | 2.7511 | 24.4444 | 27.1955 | D |
| 12 | Halo_Infinite | SHOOTER | Xbox | 2021-12-08 | 12 | 6.5 | 7.0 | 6.5 | 0.0000 | 0.0000 | 0.0000 | D |
The FREQ Procedure
| Popularity_Grade | Frequency |
|---|---|
| B | 2 |
| C | 1 |
| D | 9 |
7) Visualizations: PROC SGPLOT examples
- Bar chart of Sales by Game
- Scatter plot of Sales vs Rating with marker size proportional to Sales
proc sgplot data=work.video_games;
vbar Game_Name / response=Sales stat=sum datalabel;
xaxis display=(nolabel) valueattrs=(size=8) fitpolicy=rotate;
yaxis label='Sales (Million)';
title 'Sales by Game (Million)';
run;
OUTPUT:
proc sgplot data=work.video_games;
bubble x=Rating y=Sales size=Sales / datalabel=Game_Name;
xaxis label='Rating (1-10)';
yaxis label='Sales (Million)';
title 'Sales vs Rating (Bubble sized by Sales)';
run;
OUTPUT:
8) Additional PROC examples to show differences
- PROC SQL for joins/aggregations
- DATA step for row-wise manipulations
- PROC MEANS vs PROC SUMMARY note
/* Example: use PROC SQL to compute total sales by platform */
proc sql;
create table work.sales_by_platform as
select Platform, sum(Sales) as Total_Sales_Million
from work.video_games
group by Platform
order by Total_Sales_Million desc;
quit;
proc print data=work.sales_by_platform;
run;
OUTPUT:
| Obs | Platform | Total_Sales_Million |
|---|---|---|
| 1 | Multi | 853.0 |
| 2 | Nintendo_Swi | 76.0 |
| 3 | PS4 | 32.0 |
| 4 | Xbox | 6.5 |
/* Example: DATA step to flag high selling games */
data work.video_games_flags;
set work.video_games;
High_Seller = (Sales >= 50); /* boolean 0/1 */
run;
proc print data=work.video_games_flags;
run;
OUTPUT:
| Obs | Game_Name | Genre | Platform | Release_Date | Game_ID | Sales_Million | Rating | Sales | High_Seller |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Monster_Hunter_World | ACTION | PS4 | 2018-01-26 | 1 | 20.0 | 8.5 | 20.0 | 0 |
| 2 | Zelda_Breath_of_the_Wild | ADVENTURE | Nintendo_Swi | 2017-03-03 | 2 | 25.0 | 9.7 | 25.0 | 0 |
| 3 | Minecraft | SANDBOX | Multi | 2011-11-18 | 3 | 200.0 | 9.0 | 200.0 | 1 |
| 4 | Among_Us | PARTY | Multi | 2018-06-15 | 4 | 60.0 | 8.0 | 60.0 | 1 |
| 5 | God_of_War | ACTION | PS4 | 2018-04-20 | 5 | 12.0 | 9.1 | 12.0 | 0 |
| 6 | Fortnite | BATTLE_ROYALE | Multi | 2017-07-21 | 6 | 350.0 | 7.8 | 350.0 | 1 |
| 7 | The_Witcher_3 | RPG | Multi | 2015-05-19 | 7 | 28.0 | 9.3 | 28.0 | 0 |
| 8 | Grand_Theft_Auto_V | ACTION | Multi | 2013-09-17 | 8 | 145.0 | 9.4 | 145.0 | 1 |
| 9 | PUBG | BATTLE_ROYALE | Multi | 2017-12-20 | 9 | 70.0 | 7.5 | 70.0 | 1 |
| 10 | Animal_Crossing_NEW_HORIZONS | SIMULATION | Nintendo_Swi | 2020-03-20 | 10 | 31.0 | 8.9 | 31.0 | 0 |
| 11 | Super_Mario_Odyssey | PLATFORM | Nintendo_Swi | 2017-10-27 | 11 | 20.0 | 9.2 | 20.0 | 0 |
| 12 | Halo_Infinite | SHOOTER | Xbox | 2021-12-08 | 12 | 6.5 | 7.0 | 6.5 | 0 |
9) Output sample: print tables so user can inspect
proc print data=work.video_games (obs=12) noobs;
title 'VIDEO_GAMES (DATA STEP)';
run;
OUTPUT:
| Game_Name | Genre | Platform | Release_Date | Game_ID | Sales_Million | Rating | Sales |
|---|---|---|---|---|---|---|---|
| Monster_Hunter_World | ACTION | PS4 | 2018-01-26 | 1 | 20.0 | 8.5 | 20.0 |
| Zelda_Breath_of_the_Wild | ADVENTURE | Nintendo_Swi | 2017-03-03 | 2 | 25.0 | 9.7 | 25.0 |
| Minecraft | SANDBOX | Multi | 2011-11-18 | 3 | 200.0 | 9.0 | 200.0 |
| Among_Us | PARTY | Multi | 2018-06-15 | 4 | 60.0 | 8.0 | 60.0 |
| God_of_War | ACTION | PS4 | 2018-04-20 | 5 | 12.0 | 9.1 | 12.0 |
| Fortnite | BATTLE_ROYALE | Multi | 2017-07-21 | 6 | 350.0 | 7.8 | 350.0 |
| The_Witcher_3 | RPG | Multi | 2015-05-19 | 7 | 28.0 | 9.3 | 28.0 |
| Grand_Theft_Auto_V | ACTION | Multi | 2013-09-17 | 8 | 145.0 | 9.4 | 145.0 |
| PUBG | BATTLE_ROYALE | Multi | 2017-12-20 | 9 | 70.0 | 7.5 | 70.0 |
| Animal_Crossing_NEW_HORIZONS | SIMULATION | Nintendo_Swi | 2020-03-20 | 10 | 31.0 | 8.9 | 31.0 |
| Super_Mario_Odyssey | PLATFORM | Nintendo_Swi | 2017-10-27 | 11 | 20.0 | 9.2 | 20.0 |
| Halo_Infinite | SHOOTER | Xbox | 2021-12-08 | 12 | 6.5 | 7.0 | 6.5 |
proc print data=work.video_games_ranked noobs;
title 'VIDEO_GAMES WITH RANKS';
run;
OUTPUT:
| Game_Name | Genre | Platform | Release_Date | Game_ID | Sales_Million | Rating | Sales | Sales_Rank | Rating_Rank |
|---|---|---|---|---|---|---|---|---|---|
| Monster_Hunter_World | ACTION | PS4 | 2018-01-26 | 1 | 20.0 | 8.5 | 20.0 | 9.5 | 8 |
| Zelda_Breath_of_the_Wild | ADVENTURE | Nintendo_Swi | 2017-03-03 | 2 | 25.0 | 9.7 | 25.0 | 8.0 | 1 |
| Minecraft | SANDBOX | Multi | 2011-11-18 | 3 | 200.0 | 9.0 | 200.0 | 2.0 | 6 |
| Among_Us | PARTY | Multi | 2018-06-15 | 4 | 60.0 | 8.0 | 60.0 | 5.0 | 9 |
| God_of_War | ACTION | PS4 | 2018-04-20 | 5 | 12.0 | 9.1 | 12.0 | 11.0 | 5 |
| Fortnite | BATTLE_ROYALE | Multi | 2017-07-21 | 6 | 350.0 | 7.8 | 350.0 | 1.0 | 10 |
| The_Witcher_3 | RPG | Multi | 2015-05-19 | 7 | 28.0 | 9.3 | 28.0 | 7.0 | 3 |
| Grand_Theft_Auto_V | ACTION | Multi | 2013-09-17 | 8 | 145.0 | 9.4 | 145.0 | 3.0 | 2 |
| PUBG | BATTLE_ROYALE | Multi | 2017-12-20 | 9 | 70.0 | 7.5 | 70.0 | 4.0 | 11 |
| Animal_Crossing_NEW_HORIZONS | SIMULATION | Nintendo_Swi | 2020-03-20 | 10 | 31.0 | 8.9 | 31.0 | 6.0 | 7 |
| Super_Mario_Odyssey | PLATFORM | Nintendo_Swi | 2017-10-27 | 11 | 20.0 | 9.2 | 20.0 | 9.5 | 4 |
| Halo_Infinite | SHOOTER | Xbox | 2021-12-08 | 12 | 6.5 | 7.0 | 6.5 | 12.0 | 12 |
proc print data=work.video_games_pop noobs;
title 'VIDEO_GAMES WITH POPULARITY SCORE & GRADE';
run;
OUTPUT:
| Game_Name | Genre | Platform | Release_Date | Game_ID | Sales_Million | Rating | Sales | Sales_Score | Rating_Score | Popularity_Score | Popularity_Grade |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Monster_Hunter_World | ACTION | PS4 | 2018-01-26 | 1 | 20.0 | 8.5 | 20.0 | 2.7511 | 16.6667 | 19.4178 | D |
| Zelda_Breath_of_the_Wild | ADVENTURE | Nintendo_Swi | 2017-03-03 | 2 | 25.0 | 9.7 | 25.0 | 3.7700 | 30.0000 | 33.7700 | D |
| Minecraft | SANDBOX | Multi | 2011-11-18 | 3 | 200.0 | 9.0 | 200.0 | 39.4323 | 22.2222 | 61.6545 | B |
| Among_Us | PARTY | Multi | 2018-06-15 | 4 | 60.0 | 8.0 | 60.0 | 10.9025 | 11.1111 | 22.0136 | D |
| God_of_War | ACTION | PS4 | 2018-04-20 | 5 | 12.0 | 9.1 | 12.0 | 1.1208 | 23.3333 | 24.4541 | D |
| Fortnite | BATTLE_ROYALE | Multi | 2017-07-21 | 6 | 350.0 | 7.8 | 350.0 | 70.0000 | 8.8889 | 78.8889 | B |
| The_Witcher_3 | RPG | Multi | 2015-05-19 | 7 | 28.0 | 9.3 | 28.0 | 4.3814 | 25.5556 | 29.9369 | D |
| Grand_Theft_Auto_V | ACTION | Multi | 2013-09-17 | 8 | 145.0 | 9.4 | 145.0 | 28.2242 | 26.6667 | 54.8908 | C |
| PUBG | BATTLE_ROYALE | Multi | 2017-12-20 | 9 | 70.0 | 7.5 | 70.0 | 12.9403 | 5.5556 | 18.4959 | D |
| Animal_Crossing_NEW_HORIZONS | SIMULATION | Nintendo_Swi | 2020-03-20 | 10 | 31.0 | 8.9 | 31.0 | 4.9927 | 21.1111 | 26.1038 | D |
| Super_Mario_Odyssey | PLATFORM | Nintendo_Swi | 2017-10-27 | 11 | 20.0 | 9.2 | 20.0 | 2.7511 | 24.4444 | 27.1955 | D |
| Halo_Infinite | SHOOTER | Xbox | 2021-12-08 | 12 | 6.5 | 7.0 | 6.5 | 0.0000 | 0.0000 | 0.0000 | D |
No comments:
Post a Comment