Viewing SELECT Statement Syntax

The SELECT statement and its subordinate clauses are the building blocks for constructing all PROC SQL queries.
General form, SELECT statement:
SELECT column-1<, ... column-n>
FROM table-1 | view-1<, ... table-n | view-n>
<WHERE expression>
<GROUP BY column-1<, ... column-n>>
<HAVING expression>
<ORDER BY column-1<, ... column-n>>;
Here is an explanation of the syntax:
SELECT
specifies the column(s) that appear in the output
FROM
specifies the table(s) or view(s) to be queried
WHERE
uses an expression to subset or restrict the data based on one or more condition(s)
GROUP BY
classifies the data into groups based on the specified column(s)
HAVING
uses an expression to subset or ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.