Advanced SQL with SAS®

Dr. Christian Schendera’s insight into the nuanced aspects of data processing and analysis is unparalleled. In Advanced SQL with SAS, he explains and expands upon the practical and advanced uses of SQL and FedSQL in a digestible and meaningful way. His explanatory approach is not only refreshing, but practical, and the book format allows SQL programmers to take what they need based upon their topic of interest. Knowing what is sustainable, valid, or performant in a given situation is just as important, if not more important, in empowering informed decisions.

The book is by a SAS user who wants other SAS users to achieve success rapidly. Advanced SQL with SAS has hundreds of code examples. Special features of the SQL syntax and the generated SAS output are carefully explained in this book. I like the subtle redundancy here. Readers can start at any point in the book at any time. Further, the chapters are  organized by degrees of difficulty and complexity. Readers can start with simple and basic topics and progressively dive into more challenging topics. In other words, beginners can begin from scratch; advanced users can reassure themselves that they have not overlooked anything. I was pleasantly surprised to find a chapter on FedSQL. This chapter alone makes this book worth reading.

Maria A. ReGester, Ph.D


Within SAS, SQL has a unique place. It provides uncommon flexibility to manipulate data and incorporates a wide variety of SAS language features, including the SAS macro language. However, with such power comes added complexity and hidden pitfalls. Thankfully, Christian Schendera's Advanced SQL with SAS is an invaluable resource that covers a variety of topics clearly and simply.

The book is structured around ten self-contained chapters that address a wide range of practical applications. Critical issues such as missing data, efficiency, and use of the macro language with PROC SQL will be of interest to most analysts. Also covered are more specialized topics such as applying integrity checks, identifying outliers, and handling geographic data. The numerous examples are the most helpful feature of the book. They typically rely on small datasets, short programs, and brief written summaries of the resulting output. An initial example may even be presented along with several variations to demonstrate the impact of small tweaks to the code. In some cases, alternatives to SQL are also presented, such as the DATA step, hash programming and PROC DS2. Several useful utility macros are also included which can easily be incorporated into a programmer's own code library.

Given the breadth and depth of this book, I would highly recommend it to a range of users with some prior SQL knowledge. Intermediate SAS users will expand their knowledge of SQL and its many applications. Experienced SQL users will learn the differences and subtleties of SQL in the SAS environment as well as other procedures and approaches available in SAS.

Frank Ivis
SAS User