Discover new selections
Add Prime to get Fast, Free delivery
Amazon prime logo
Buy new:
-41% $29.56
FREE delivery Friday, May 2 on orders shipped by Amazon over $35
Ships from: Amazon
Sold by: Everleaf Books
$29.56 with 41 percent savings
List Price: $49.99
Get Fast, Free Shipping with Amazon Prime FREE Returns
FREE delivery Friday, May 2 on orders shipped by Amazon over $35
Or Prime members get FREE delivery Monday, April 28. Order within 6 hrs 44 mins.
Only 1 left in stock - order soon.
$$29.56 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$29.56
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Ships from
Amazon
Amazon
Ships from
Amazon
Returns
30-day refund/replacement
30-day refund/replacement
This item can be returned in its original condition for a full refund or replacement within 30 days of receipt.
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
$9.70
Get Fast, Free Shipping with Amazon Prime FREE Returns
Used books, shipped from the USA. Satisfaction Guaranteed! Used books, shipped from the USA. Satisfaction Guaranteed! See less
FREE delivery May 15 - 21 on orders shipped by Amazon over $35
Or fastest delivery May 15 - 18
$$29.56 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$29.56
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Access codes and supplements are not guaranteed with used items.
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

SQL Cookbook: Query Solutions and Techniques for Database Developers 1st Edition

4.6 out of 5 stars 315 ratings

{"desktop_buybox_group_1":[{"displayPrice":"$29.56","priceAmount":29.56,"currencySymbol":"$","integerValue":"29","decimalSeparator":".","fractionalValue":"56","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"ttNgae%2BGgk7JOM1FLpFAwZaKgBsdRqlBq09gZAAwdnQu8Ant9uG%2BDo1GR0Xxl6lOrd6v6Wf0k2JfJRuVLL1lXFrZ5UKs5F5Gk18rPTyJd9MU%2FhuypjNHc%2FbQb3t5Ck%2Bt5jb5RUTvO9ol3L%2F2V0VuP73hGA1HCdUJ%2Fbu2FO5YbFzFuVKr6NUtplonTBDMO6Gn","locale":"en-US","buyingOptionType":"NEW","aapiBuyingOptionIndex":0}, {"displayPrice":"$9.70","priceAmount":9.70,"currencySymbol":"$","integerValue":"9","decimalSeparator":".","fractionalValue":"70","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"ttNgae%2BGgk7JOM1FLpFAwZaKgBsdRqlB5J61IiagDOtOE%2FAZmOKGkUAeTCRcFSpnj3hR27JJHhvS1uN2%2FclAUrhnPi5x92XsTwN4hiDus6dL2g35k3QHaWVBNj%2Bu1WNwSxRzl17dPQSjAjl3fJ8xcpZ%2BcqFMxqcDxQCjY98p%2FSdEFP9kiirbYvIQ6T%2Bi0eSh","locale":"en-US","buyingOptionType":"USED","aapiBuyingOptionIndex":1}]}

Purchase options and add-ons

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 columns FROM table WHERE conditions. 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, we all 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.

There is a newer edition of this item:

Frequently bought together

This item: SQL Cookbook: Query Solutions and Techniques for Database Developers
$29.56
Get it as soon as Friday, May 2
Only 1 left in stock - order soon.
Sold by Everleaf Books and ships from Amazon Fulfillment.
+
$36.49
Get it as soon as Wednesday, Apr 30
In Stock
Ships from and sold by Amazon.com.
+
$22.00
Get it as soon as Wednesday, Apr 30
Only 1 left in stock - order soon.
Sold by ORE stORE and ships from Amazon Fulfillment.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
Some of these items ship sooner than the others.
Choose items to buy together.

From the brand

Editorial Reviews

About the Author

Anthony Molinaro is a SQL developer and database administrator with many years experience in helping developers improve their SQL queries. SQL is particular passion of Anthony's, and he's become known as the go-to guy among his clients when it comes to solving difficult SQL query problems. He's well-read, understands relational theory well, and has nine years of hands-on experience solving tough, SQL problems. Anthony is particularly well-acquainted with new and powerful SQL features such as the windowing function syntax that was added to the most recent SQL standard.

Product details

  • ASIN ‏ : ‎ 0596009763
  • Publisher ‏ : ‎ O'Reilly Media; 1st edition (January 24, 2006)
  • Language ‏ : ‎ English
  • Paperback ‏ : ‎ 633 pages
  • ISBN-10 ‏ : ‎ 9780596009762
  • ISBN-13 ‏ : ‎ 978-0596009762
  • Item Weight ‏ : ‎ 2.03 pounds
  • Dimensions ‏ : ‎ 7 x 1.4 x 9.19 inches
  • Customer Reviews:
    4.6 out of 5 stars 315 ratings

About the author

Follow authors to get new release updates, plus improved recommendations.
Anthony Molinaro
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Discover more of the author’s books, see similar authors, read book recommendations and more.

Customer reviews

4.6 out of 5 stars
315 global ratings

Review this product

Share your thoughts with other customers

Customers say

Customers find this SQL cookbook extremely useful and appreciate its excellent explanations and examples. The book is well-written and serves as a great reference, with one customer noting it's particularly helpful for beginners and experts alike. Additionally, they value its comprehensive coverage across different relational database management systems, with examples provided for major SQL databases.

AI-generated from the text of customer reviews

49 customers mention "Book content"49 positive0 negative

Customers find the book extremely useful and appreciate its content, with one customer noting it serves as a great on-hand resource for daily or occasional use.

"...However, this is the book that takes you to another level. This is the book that enables you to find solutions that others won't be able to...." Read more

"...problem in the text, but in the end, it definitely helped to improve my sql code reading, designing, and coding skills...." Read more

"...This has been an invaluable reference that sits on my desk and gets pulled down when I need a guide to accomplish a task...." Read more

"...It is the single most valuable reference book I have ever purchased. I very much recommend it." Read more

44 customers mention "Ease of understanding"44 positive0 negative

Customers find the book easy to understand, praising its excellent explanations and useful tips and tricks. They appreciate the examples provided and how it introduces various topics, with one customer noting it serves as an excellent reference for developers with secondary querying responsibilities.

"...This book turns you into a magician, and it is all hands on examples, no filler, no lengthy unneeded explanations. Learn by doing." Read more

"...However, this particular cookbook can also be used by less experienced programmers as part of "learning by example" methodology...." Read more

"...The time saved and effective solutions developed have proved this to be a valuable resource over and over again...." Read more

"...And one can gain a deep understanding of how SQL works. Always a plus for anyone that is new to an environment...." Read more

8 customers mention "Readability"8 positive0 negative

Customers find the book well written and easy to understand, with one customer noting it helps speed up problem solving.

"...The time saved and effective solutions developed have proved this to be a valuable resource over and over again...." Read more

"...It rates 5 stars. While Kindle is a very good format for reading a novel, it is an awful format for technical books like this...." Read more

"...I think the book is very well written and I would definitely recommend it to IT professional or students working towards IT degree programs...." Read more

"...and have already learned many quick tricks that have sped up my problem solving quite a bit. Very solid book for beginner and expert." Read more

6 customers mention "Database architecture"6 positive0 negative

Customers appreciate the book's coverage of database architecture, with one customer noting that it provides solutions for several different relational database management systems, while another mentions that examples are given for all major SQL databases.

"...In over 500 pages the author covers a lot of ground, for various DBMS, as can be seen on the front cover: SQL Server, PostgresSQL, Oracle, MySQL..." Read more

"...This book is setup for all levels of SQL users. You can easily skip through sections you already know and read further into the ones you want." Read more

"...scenarios it does so by going over solutions for several different relational database management systems including SQL Server, Oracle, MySQL, DB2..." Read more

"...to see that this book covers so many useful topics and it covers 4 databases...." Read more

Top reviews from the United States

  • Reviewed in the United States on August 12, 2017
    It's the first SQL book I picked up, but be warned, it is for at least intermediate level users. So by the time I reached Chapter 3, I gave up and bought Ben-Gan's Fundamentals of T-SQL first (which I recommend going through before this book if you are a beginner).
    If you are using T-SQL, I think Ben-Gan's book is a perfect intro to this one. However, this is the book that takes you to another level. This is the book that enables you to find solutions that others won't be able to. This is the book that makes you a player at work if you aren't a developer and you write SQL. There are no functions, triggers, optimization, table and view creation details. This book is about pulling whatever you want with those things already created (although there is a chapter on metadata and another on inserting/updating). So it isn't for everyone (Developers and Beginners especially).

    Also, the book's date may scare people. I mean, the book could use an update as it is working with SQL Server 2005 (if you write T-SQL like I do). Based on the date, I'm sure the editions of the other platforms are outdated as well. With SQL Server 2005 capabilities though, you still get Window Functions, Pivots, string extraction, cast, convert, etc., and some of the Oracle functions not in SQL Server 2005 are a part of T-SQL in later editions, so at times, you can use the Oracle solution or pieces of it if you are using the latest edition of SQL Server (if you need to use lead and lag for example). The important functions that still exist are there for the most part (Concat for example, is not).

    Most people know how to use partitioning, cases, and subqueries, but can they cast an integer as a string to cast it again into decimal, average that decimal using a case statement that filters out negative values and partition the average as a window function based on multiple criteria all in one line? This book turns you into a magician, and it is all hands on examples, no filler, no lengthy unneeded explanations. Learn by doing.
    47 people found this helpful
    Report
  • Reviewed in the United States on July 1, 2009
    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.
    5 people found this helpful
    Report
  • Reviewed in the United States on September 23, 2015
    When you work with SQL infrequently, as I do, but do things beyond the trivial, this book is an excellent way to dive right back into complex query tasks. This has been an invaluable reference that sits on my desk and gets pulled down when I need a guide to accomplish a task. It serves as a way to find a basic approach to the problem at hand and then I can adapt and perhaps combine one or more recipes to do the job. The time saved and effective solutions developed have proved this to be a valuable resource over and over again.

    I am not sure how effective this book would be for someone who works on intermediate or advanced queries on a frequent basis. The recipes run the gamut from simple to complicated. However, for someone who needs to dive back in the queries once a month or so, it is a great reference to have on hand. The database-agnostic approach has also benefited me as I moved from an Oracle shop, to an outdated SQL Server shop, to a modern SQL Server shop.
    5 people found this helpful
    Report
  • Reviewed in the United States on December 15, 2011
    I have owned this book since 2006, and I use it in a DB2 environment. I do not use SQL daily or perhaps I would have outgrown the book by now. As it is, the book is smudged and dogeared. It is the book I open every time I need to do something new with SQL, or something that I have not done for a long time. It is extremely well organized, and I rarely have to spend much time finding what I'm looking for. In all this time I have found only one example that was erroneous among all the various topics I've pursued; that was for a complex statement that could have been impacted by an update to DB2 over time. I think it's remarkable that a single book could be so useful over such a long period of time. It is the single most valuable reference book I have ever purchased. I very much recommend it.
    5 people found this helpful
    Report

Top reviews from other countries

Translate all reviews to English
  • Adrián
    5.0 out of 5 stars Excelente!!!
    Reviewed in Mexico on September 10, 2019
    Lo que necesitaba para estudiar, con un detalle en el libro debido a la paquetería.
    Report
  • Scott
    5.0 out of 5 stars Excellent learning resource
    Reviewed in Canada on April 17, 2019
    These recipes teach you a tonne of fundamental techniques in a very clear way. Specific syntax examples are given for each database vendor for each recipe.
  • Massimo_Jr
    5.0 out of 5 stars Da leggere
    Reviewed in Italy on December 22, 2019
    Ottimo, moltissimi esempi e tecniche, soprattutto per chi lavora con i reporting services.
  • dengmw
    5.0 out of 5 stars Clear and easy to follow
    Reviewed in the United Kingdom on March 17, 2020
    Very easy to follow
  • jorge marcano
    5.0 out of 5 stars Product on excelente conditions
    Reviewed in Canada on January 7, 2021
    Learning new skills