Press Room

Press Release: January 4, 2006

SQL Cookbook: Getting More from SQL with Expert Techniques and Features

Sebastopol, CA--SQL is one of the topics that many programmers learn a little about, but just enough to eke by while building that web application or performing a task in the office. It's a deceptively easy language to learn. Database developers can begin with the simple statement: SELECT FROM

WHERE and accomplish quite a bit. Many, in fact, don't go far beyond that. Yet, there is so much more that the language can do. In SQL Cookbook (O'Reilly, US $ 39.95), experienced SQL developer Anthony Molinaro shows off his favorite SQL techniques and features.

Molinaro has provided an exceptional resource for all SQL programmers interested in getting the best out of the language. Molinaro says, "Databases are the foundation of IT So, knowing how to retrieve information is of utmost importance. Additionally, poorly performing SQL is typically at the root of database performance problems; knowing how to write efficient queries enables fast data access, which is crucial today. People want their information and they want it immediately. Knowing new features such as window functions provides better performance in many cases. Moreover, window functions allow you to do in SQL what used to be done in application code."

The book contains more than 200 recipes for solving SQL problems. Molinaro describes it, "Queries, queries, queries. My goal from the beginning was not so much to write a 'SQL Cookbook' as to write a 'Query Cookbook.' I've aimed to create a book of queries ranging from the relatively easy to the difficult in hopes the reader would grasp the techniques behind those queries and use them to solve their own business problems."

SQL Cookbook covers SQL Server, PostgreSQL, Oracle, MySQL, and DB2, and includes recipes on the following important topics:

  • Window functions
  • Pivoting rows into columns
  • Reverse-pivoting columns into rows
  • Creating histograms
  • Summarizing data into buckets
  • Generating running totals and subtotals
  • Walking a string
  • Vendor specific features such as Server's PIVOT, Oracle's MODEL clause, and PostgreSQL's GENERATE_SERIES
  • Molinaro is known as the go-to guy among his clients when it comes to difficult SQL query problems. He's thoroughly well versed in the subject, understands relational theory, and has nine years hands-on experience solving tough SQL problems. He has given SQL users at all levels the ideal book, written in the popular problem/solution/discussion format of O'Reilly's Cookbook series.

    If you know the rudiments of the SQL query language, yet aren't taking full advantage of it, the SQL Cookbook can show you how to get more out SQL before you resort to other tools or languages.

    As Olivier Pomel, director of technology for Wireless Generation, Inc. says, "Once you find out how many lines of convoluted application code you can save when leveraging SQL, this book won't leave your desk."

    Additional Resources:

    SQL Cookbook
    Anthony Molinaro
    ISBN: 0-596-00976-3, 595 pages, $39.95 US
    1-800-998-9938; 1-707-827-7000

    About O'Reilly

    For almost 40 years, O’Reilly Media has provided technology and business training, knowledge, and insight to help companies succeed. Our unique network of experts and innovators share their knowledge and expertise through the company’s Safari training and learning platform and at O’Reilly conferences. As a SaaS learning platform, Safari delivers highly topical and comprehensive technology and business learning solutions to millions of users across enterprise, consumer, and university channels. For more information visit

    Return to: O'Reilly Press Room

    Recent Press Releases

    6/18/18 O'Reilly Named a Top 20 Online Learning Library by Training Industry
    4/20/18 Strata Data Conference in London announces expanded program
    4/17/18 O'Reilly Announces Lineup for Eleventh Annual Velocity Conference in San Jose
    4/10/18 New O'Reilly Survey Results Shed Light on Artificial Intelligence Skills Gap
    3/20/18 O'Reilly and Intel Announce Lineup for Artificial Intelligence Conference, New York 2018

    Press Release Archive »


    Press Contacts

    Media Relations – Corporate & North America

    Fama PR

    Media Relations – Japan

    Fumi Yamakawa
    +81 3-3356-5227

    Media Relations – United Kingdom

    Helen Codling
    +44 (0) 1252 721284