This chapter covered how to implement referential actions via triggers, generate test data, and solve various types of statistical or time series problems. It showed standard SQL solutions as well as the use of SQL Server extensions. It also presented solutions to problems that are difficult to solve in SQL, such as expanding a hierarchy or pivoting a table. The chapter presented real-world solutions for use of the xp_mail functionality, as well as examples of running Automation objects from SQL Server. It also showed a solution for cracking a text column into multiple sequenced rows of varchar datatypes.