Introduction

Suppose that you run a specialty foods shop. On a regular basis, you need to check your inventory, reorder products, and determine which types of products are generating the most profit. To help you perform these tasks, you can use SAS Enterprise Guide to create, run, and save queries (requests to retrieve data).

Using queries, you can

  • examine relationships between data values
  • subset and sort your data
  • compute values quickly
  • join tables to combine data from different sources
  • group and summarize data.

Depending on your needs, you can request different types of output from your queries: data tables, data views (stored queries), or reports.



SAS Enterprise Guide queries

SAS Enterprise Guide queries
Behind the scenes, SAS Enterprise Guide uses SQL (Structured Query Language) to create your queries. This means that with SAS Enterprise Guide, you don't need to know any programming statements to produce a variety of basic and advanced queries. However, if you are familiar with SQL, you can easily modify the code that is generated.

This lesson guides you through creating several queries that help you manage your specialty foods shop. You learn how to create queries to

  • check your inventory levels
  • determine which products you need to reorder
  • identify discontinued products that you can feature in a promotion
  • display supplier contact information for reorders
  • calculate your profits for different categories of products.

Once you create your queries, you can use them to run SAS Enterprise Guide tasks such as List Data, Summary Statistics, and One-Way Frequency Tables.


This lesson contains pages and takes approximately 90 minutes to complete.


In this lesson, you learn to

  • set query options
  • open a query
  • select rows based on one or more conditions
  • select, order, and sort columns
  • define new columns
  • join tables in different ways
  • replace data values
  • group and summarize data
  • specify a parameter for a query.

Before taking this lesson, you should
  • know common computer terminology
  • be familiar with your operating environment, including its file structure and basic commands
  • be familiar with your browser, monitor, keyboard, and mouse
  • complete the Getting Started tutorial for SAS Enterprise Guide or SAS Learning Edition. (To take the tutorial, start SAS Enterprise Guide or SAS Learning Edition and select HelparrowGetting Started Tutorial.)