SQL Cookbook



Price: $26.37


SQL Cookbook (O\'Reilly Media, Inc.) - December 2005Publisher: O'Reilly Media, Inc. - December 16, 2005

ISBN-10: 0596009763, ISBN-13: 9780596009762

Author: Anthony Molinaro


628 pages


SQL Cookbook - book reviews: 45



Book Description
You know the rudiments of the SQL query language, yet you feel you aren't taking full advantage of SQL's expressive power. You'd like to learn how to do more work with SQL inside the database before pushing data across the network to your applications. You'd like to take your SQL skills to the next level.

Let's face it, SQL is a deceptively simple language to learn, and many database developers never go far beyond the simple statement: SELECT FROM WHERE . But there is "so" much more you can do with the language. In the "SQL Cookbook," experienced SQL developer Anthony Molinaro shares his favorite SQL techniques and features. You'll learn about:

Window functions, arguably the most significant enhancement to SQL in the past decade. If you're not using these, you're missing out

Powerful, database-specific features such as SQL Server's PIVOT and UNPIVOT operators, Oracle's MODEL clause, and PostgreSQL's very useful GENERATE_SERIES function

Pivoting rows into columns, reverse-pivoting columns into rows, using pivoting to facilitate inter-row calculations, and double-pivoting a result set

"Bucketization," and why you should never use that term in Brooklyn.

How to create histograms, summarize data into buckets, perform aggregations over a moving range of values, generate running-totals and subtotals, and other advanced, data warehousing techniques

The technique of "walking a string," which allows you to use SQL to parse through the characters, words, or delimited elements of a string

Written in O'Reilly's popular Problem/Solution/Discussion style, the "SQL Cookbook" is sure to please. Anthony's credo is: "When it comes down to it, we all go to work, weall have bills to pay, and we all want to go home at a reasonable time and enjoy what's still available of our days." The "SQL Cookbook" moves quickly from problem to solution, saving you time each step of the way.



Most helpful customer reviews

Book rating: 4Good stuff but kind of repetitive

I work a lot crunching data, and it turns out that i got a whole lot of good tips from this book... The problem is that somehow the tips got very repetitive. For beginners would be very helpful as repetitiveness might inspire different approaches, but for an advance user this variability is irritanting.. well, at least for me. - - even so... GOOD to have at hand.

Manuel Zarate Sinfonte
23 July, 2009


Book rating: 5Other uses for this book

Majority of the cookbooks cater to seasoned programmers so they can quickly lookup a solution without having to reinvent the wheel. However, this particular cookbook can also be used by less experienced programmers as part of "learning by example" methodology.

After learning the sql basics, I had decided to purchase this text. I would read the problem statement and then try to implement the solution by myself. I would compare my solution to that of the author's. Or in certain cases, cheat by copying the given solution. It took me 3+ months to try each and every problem in the text, but in the end, it definitely helped to improve my sql code reading, designing, and coding skills.

I would recommend this book to anybody who is interested in mastering any flavor of sql.


F. Riaz
01 July, 2009


Book rating: 4Good SQL reference

This books does what it's supposed to do. Lots of good solutions to SQL problems.

John F. Richards
14 June, 2009


Book rating: 5Helped Me (a SQL Newbie) Deliver Cmplex SQL Reports

I was tasked with deliverying 6 key-performance-indicator (KPI) using SQL and Crystal Reports and an Oracle database. And for three disparate areas in the world (USA, Singapore, and The Netherlands).
Sure, I could write a 'SELECT' statement or perform and 'UPDATE'.
But, I did not know how to approach SQL as being a 'complete' solution for record selection.
The Crystal Reports portion was not too much trouble.
I was using the PL/SQL environment for creating the SQL. Oracle 10g.

Mr. Molinaro's book was instrumental in having me develop what turned out to be some rather complex SQL.
It took awhile to get to use SQL's window functions. But, the author's presentation/explanation made them more than approachable---and quite useful.
I liked the explanations that covered the multiple vendors' database engines.
I will make no pretense of having reached SQL knowledge 'nirvana'--However, there was more than one time where I was out of ideas on how to get/count certain data----The SQL Cookbook did its job by showinge 'yet another way' to approach a pressing problem with a solution.
And one can gain a deep understanding of how SQL works. Always a plus for anyone that is new to an environment.
If there was something like a SQL University, this book seems to be text that would work very well for giving students more than enough 'footing' to face the 'real' world. It did for me.
I am more than pleased to have this book as part of my SQL 'library.'

John R. Spencer
25 November, 2008


Book rating: 5SQL Tookbox Must-Have

The thing I like about the O'Reilly 'Cookbook' series is that you may not have to use them for months, but when you need them they are there with the answers. And oftentimes finding the "one answer" that has been eluding you for hours or even days is worth the price of the book.
This book falls into that category. What's really nice is that the author provides solutions for 5(!) different databases. And he does a good job explaining the solutions, making it easy to extrapolate them to solve similar queries.

Larry
27 September, 2008