While introducing you to SAS programming we looked at the structure of the Proc SQL query. Let's look at the various join options in SAS. We will try and create a basic join without imposing any conditions.
We will use the Class dataset used in previous datasets and the following Grade dataset:
Data Grade;
Input ClassID $ Year Grade $;
Datalines;
A1234 2013 A
A2323 2013 A
B3423 2013 B
B5324 2013 C
C2342 2013 C
D3242 2013 D
A1234 2019 B
A2323 2019 C
B3423 2019 D
B5324 2019 B
C2342 2019 C
D3242 2019 D
;
The following code will produce a dataset that contains the yearly grades of the students found in the Class dataset:
Proc SQL;
Create Table Class_Grade As
Select *
From Class, Grade
;
Quit;
After executing the preceding code, the key to understanding the joints doesn't lie in just exploring the results. Instead, first let&apos...