Introduction

Sometimes you need quick answers to questions about your data. You might want to query (retrieve data from) a single SAS data set or a combination of data sets to

  • examine relationships between data values
  • view a subset of your data
  • compute values quickly.

The SQL procedure (PROC SQL) provides an easy, flexible way to query and combine your data. This lesson shows you how to create a basic query using one or more tables (data sets). You'll also learn how to create a new table from your query.


Diagram of joining two tables to produce query output



1 hour



In this lesson, you learn to

  • invoke the SQL procedure
  • select columns
  • define new columns
  • specify the table(s) to be read
  • specify subsetting criteria
  • order rows by values of one or more columns
  • group results by values of one or more columns
  • end the SQL procedure
  • summarize data
  • generate a report as the output of a query
  • create a table as the output of a query.

complete the following lessons:

  • .