Summary

Advanced SQL techniques are the key to getting the most from your datasources. By using tools such as aggregate functions and SQL views, you can create templates that do much more than blindly output records from a database.

For example, SQL's aggregate functions enable you to report "data about the data," such as automatically computing numeric averages, finding maximum and minimum values, and counting the number of records returned by a query. SQL's column alias feature enables you to work with databases that use field names that would otherwise be illegal in ColdFusion—possibly databases used by a client.

Table joins and subqueries enable you to process data from more than one table in a single query. With table joins, relationships ...

Get Sams Teach Yourself ColdFusion® in 21 Days 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.