Andrew Puleo
PROC SQL is a powerful procedure that leverages the syntax of the American National Standards Institute’s Structured Query Language (SQL). It is often used to create complex reports from multiple tables which are related by a common key, or column. Joins or subqueries can be used interchangeably to create reports from related tables. Almost always, for a query that uses a join, there is an equivalent query which accomplishes the same task using a subquery, and vice versa. This paper compares the coding of different, but equivalent, queries visually and in terms of time complexity. In addition, the reader will be introduced to several large data sets, available online in SAS data format.
View paper.