backnextLearning Path
   


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



Time to Complete

This lesson contains pages and takes approximately 1 hour to complete.



Objectives

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.

Prerequisites

Before taking this lesson, you should complete the following lessons:

  • .

  Copyright © 2003 SAS Institute Inc., Cary, NC, USA. All rights reserved.
Terms of Use & Legal Information | Privacy Statement
backnext