Although you won't be asked questions about SQL on the certification exam, we don't want you to forget what a valuable skill it is in your SAS Programming Toolkit. I want to review how you can use PROC SQL to easily join tables to combine columns into a single table. First, I'll look at the Profit table and point out the Customer_Country column with the two letter codes. We did correct the case, but it would be nice to have the full country names in the final table. We do have country codes and corresponding names in the country_clean table that we created earlier. Recall we removed duplicates with PROC SORT, so this table is ready to join with profit. You can combine these two tables using either a DATA step merge or an SQL join. For this example, I'll use SQL, and later, we'll review more thoroughly the DATA step merge. I'll start with the PROC SQL statement. Remember, by default, SQL creates a report. Instead, I want to generate a table, so I'll begin my query with create table profit_country as and then continue with the SELECT clause. After select, I list the columns I want to include from both tables separated by commas. Because I want all columns from the Profit table, I can type profit.* as a shortcut. After a comma, I'll add the Country_Name column. Because it is found only in the country_clean table, I don't need to qualify the column with a table name. Next we use the FROM clause to name our two tables, profit and country_clean with the keywords INNER JOIN between them. An inner join creates the ON clause, which defines matching rows. Rows match between the two tables when Customer_Country from the Profit table matches Country_Key from the country_clean table. Because these two columns appear in only one of the tables, I am not required to use the table prefix. However, it doesn't hurt, so I'll put it here in my syntax. Finally, I'll use the ORDER BY clause to arrange the rows of the output table by Order_Date in descending sequence. A single semi-colon closes the entire query that began with CREATE TABLE. After the query, I close PROC SQL with a QUIT statement. I'll run the step, take a quick look at the log, and let's check out our new table. We now have the additional column with the full country name in our profit_country table. I'll save the program.