EPG1V2_Summary of Lesson 7_ Using SQL in SAS
EPG1V2_Summary of Lesson 7_ Using SQL in SAS
The SELECT statement describes the query. List columns to include in the results after SELECT, separated by commas.
The ORDER BY clause arranges rows based on the columns listed. The default order is ascending. Use DESC after a column name to reverse the
sort sequence.
PROC SQL;
SELECT col-name, col-name
FROM input-table;
QUIT;
Subsetting data:
WHERE expression
Sorting data:
Deleting data:
Assign an alias (or nickname) to a table in the FROM clause by adding the keyword AS and the alias of your choice. Then you can use the alias in
place of the full table name to qualify columns in the other clauses of a query.
Copyright © 2023 SAS Institute Inc., Cary, NC, USA. All rights reserved.