In this course, you learn about Structured Query Language (SQL) and how it can be used in SAS programs to create reports and query your data.
“By the end of this course, a learner will be able to…”
● Query and subset data.
● Summarize and present data.
● Combine tables using joins and set operators.
● Create and modify tables and views.
● Create data-driven macro variables using a query.
● Access DBMS data with SAS/ACCESS technology.
Course Overview and Data Setup
-In this module you get an overview of what you learn in this course and you set up the software and data you use for activities and practices in the course.
-In this module, you learn about the Structured Query Language (SQL) and begin exploring data using the SQL procedure in SAS.
PROC SQL Fundamentals
-In this module, you learn the fundamentals of SQL by using the SELECT, FROM, WHERE, GROUP BY, HAVING, and ORDER BY clauses. You generate simple queries, group and summarize data, create and manage tables, and retrieve information about your SAS session using DICTIONARY tables.
-In this module, you learn about joining data horizontally from multiple tables using the Cartesian product. You learn how to perform INNER, OUTER and complex joins.
-In this module, you learn about using subqueries, or a query within a query. You begin by using a subquery in the WHERE or HAVING clause to dynamically subset your data, then you use a query in the FROM clause (In-Line view) to act as a virtual table. Finally, you use a subquery in the SELECT clause to perform dynamic calculations.
-In this module, you learn to concatenate tables horizontally using the INTERSECT, EXCEPT, UNION and OUTER UNION set operators. You learn the difference between the set operators, as well as how to use modifiers to adjust the default behavior.
Using and Creating Macro Variables in SQL
-In this module, you learn about creating and utilizing user-defined macro variables to dynamically write programs that are easily maintained. In addition, you learn to create data-driven macro variables using the SQL procedure, and how to apply the newly created macro variables to your program.
Accessing DBMS Data with SAS/ACCESS
-In this module, you learn about SAS/ACCESS technology to retrieve data from third party database management systems (DBMS). You learn about accessing data from a DBMS through the SQL Pass-Through Facility, which allows you to use the specific DBMS implementation of SQL, and the SAS/ACCESS LIBNAME statement, which translates SAS SQL to native DBMS SQL. Finally, you learn about the FEDSQL procedure to use vendor neutral SQL to push as much processing into the DBMS as possible.
Case Study (Optional - Honors)
-In this case study, you solve a real-world business problem by applying concepts that you learned in this course.