Buy new:
-61% $19.10$19.10
Ships from: PRIME-BOOKS Sold by: PRIME-BOOKS
Save with Used - Good
$3.16$3.16
Ships from: Valleys Books & More Sold by: Valleys Books & More

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.
Joe Celko's SQL Puzzles and Answers (The Morgan Kaufmann Series in Data Management Systems) 1st Edition
Purchase options and add-ons
Joe Celko challenges you with his trickiest puzzles and then helps you conquer them with a variety of solutions and explanations. The puzzles are a compilation from Joe's columns in DBMS and Database Programming & Design magazines. They include new, never-before-published puzzles plus new solutions and extra background for previously published puzzles. In his usual entertaining and informative style, Joe demonstrates the thought processes that are involved in attacking a problem from an SQL perspective. Through the practical, enjoyable puzzles, he introduces immediately useful new techniques and applications for SQL programming, and shows the database programmer how to write and use non-procedural programs.
- ISBN-109781558604537
- ISBN-13978-1558604537
- Edition1st
- PublisherMorgan Kaufmann
- Publication dateMarch 15, 1997
- LanguageEnglish
- Dimensions0.75 x 7.25 x 9.25 inches
- Print length200 pages
There is a newer edition of this item:
$40.65
(36)
Only 6 left in stock (more on the way).
Popular titles by this author
Editorial Reviews
Review
From the Back Cover
"This little collection of puzzles is something to bash your head against while awaiting your SQL epiphany." --Joe Celko
Joe Celko challenges you with his trickiest puzzles and then helps you conquer them with a variety of solutions and explanations. The puzzles are a compilation from Joe's columns in DBMS and Database Programming & Design magazines. They include new, never-before-published puzzles plus new solutions and extra background for previously published puzzles. In his usual entertaining and informative style, Joe demonstrates the thought processes that are involved in attacking a problem from an SQL perspective. Through the practical, enjoyable puzzles, he introduces immediately useful new techniques and applications for SQL programming, and shows the database programmer how to write and use non-procedural programs.
About the Author
Mr. Celko is author a series of books on SQL and RDBMS for Elsevier/MKP. He is an independent consultant based in Austin, Texas.
He has written over 1200 columns in the computer trade and academic press, mostly dealing with data and databases.
Product details
- ASIN : 1558604537
- Publisher : Morgan Kaufmann; 1st edition (March 15, 1997)
- Language : English
- Paperback : 200 pages
- ISBN-10 : 9781558604537
- ISBN-13 : 978-1558604537
- Item Weight : 14.5 ounces
- Dimensions : 0.75 x 7.25 x 9.25 inches
- Best Sellers Rank: #4,073,006 in Books (See Top 100 in Books)
- #603 in SQL
- #779 in Library Management
- #1,008 in Management Information Systems
- Customer Reviews:
About the author

I was a member of the ANSI X3H2 Database Standards Committee from 1987 to 1997 and helped write the ANSI/ISO SQL-89 and SQL-92 Standards. I have nine books and have written over 1200 columns in the computer trade and academic press, mostly dealing with data and databases.
I live in Austin,TX. When I am not writing, I am consulting, speaking at conferences, teaching SQL training classes anywhere on Earth or beating up newbies in SQL Newsgroups.
The rumor that I own only one black suit that I have worn for 30 years is false; I own six identical black suits that I have worn for 30 years.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on March 9, 2011I just started reading this book and the puzzles are challenging and interesting. However, it would have been nice if someone would have taken the trouble to create sample database scripts, with sample data. That would make solving the puzzles much more fun and less labour intensive. A model for this would be the excellent websites where SQL problems are presented with table variables and a small script to create the table in both TSQL and Oracle.
This omission drops my grade a full 2 stars from 4-star to 2-star.
- Reviewed in the United States on February 17, 2006A marketing slogan at the back of the cover says "This little collection of puzzles is something to bash your head against while waiting your SQL epiphany". A little bit too promising.
The problems in the book look very much like typical problems that I have to solve at work every day. Any mid-level SQL developer could probably write a book of the same kind and usefullness by just logging every problem they solved at work for a period of a year. For this reason, if you did a lot of SQL work, you won't find anything useful in this book.
If I am presented a puzzle, I expect it to look impossible to solve at first, and once you get on track of finding a solution, solving it would turn out to be a lot of fun. The "puzzles" in this book are not like that.
As other reviewers already noted, the answers are a bit disappointing, too. I sent the book back to Amazon within a day. I'd rather spend $5 on return shipping than $30 on a worthless book.
- Reviewed in the United States on July 10, 2003I have been working with SQL professionally for about 5 years and I was looking for a collection of elegant SQL code tips and techniques from the pros to add to my arsenal. So I eagerly bought SQL Puzzles and Answers a few weeks ago and read it from cover to cover.
The book essentially introduces the reader to the "thinking out of the box" approach to solving difficult SQL problems. The author walks us through the logic behind solutions of a collection of SQL puzzles that were submitted by readers of his magazine columns over the years. He demonstrates that there are numerous ways to solve SQL problems and that sometimes the solution lies right in the design of the base tables. But more importantly he helps the reader see that you can often solve seemingly unsolvable sql problems if you approach the problem with the right technique.
My one complaint is that the book does not come with turnkey source code files and they are not available for download. So the reader will have to type everything to test the solutions solutions that are presented.
Short of this there is plenty to learn here for the SQL programmer that wishes to pick up a few tricks of the trade from a pro.
- Reviewed in the United States on September 20, 1999The hidden jewel of the Celko trilogy, this is one of my favorite SQL books. It takes the concepts in Celko's seminal work, SQL for Smarties, and illustrates how to apply them to solve real-world problems. As always, the book is rife with tales from Celko's long and varied career in the SQL trenches, as well as the subtle witticism for which he is famous. Like all great technical books - it's timeless - the techniques you learn today will work tomorrow because Celko follows the ANSI/ISO standard to the letter. As a fellow author, I can appreciate the work that went into writing this book - real examples require real work, especially by the author. This book belongs in the library of every would-be SQL practitioner.
- Reviewed in the United States on July 11, 2000This is a very nice book! I used it to increase the SQL level of my employees. We did two puzzles a week, and compared our answers. And it sure helped. But there are some buts in this story. First, the puzzles are not always defined well, so you do not know what to do before you see the discussion in the answer part. Second, a lot of the solutions are not very good. Whenever I found a better one, I mailed Joe Celko. Every time he replied to me (very nice!) that somebody else also pointed it out and that there were even better solutions that mine. This means that the solutions are not always that good in the book. But still, it has alo of good brainteasers. But try them first yourself before looking to the answers as your answer could be better.
- Reviewed in the United States on January 6, 2000This book gives you the opportunity to improve you SQL skills by solving the tricky puzzles. Celko's insightful solutions will provide you with a SQL gurus approaches.
You should have some SQL experience before trying this book.
- Reviewed in the United States on January 6, 2001Great problems and amazing solutions. I'll probably never have to use a cursor again. I'm not lending my copy to anyone. They'll have to get their own.
- Reviewed in the United States on December 2, 1999This book contains a set of problems to be solved using SQL, and the problems are such that they make the reader think of SQL and use it in a set based manner as opposed to mixing in procedural techniques.
A stellar book for instruction is SQL, as not only do the problems teach about how to solve SQL problems correctly, but many of the problems are quite difficult, providing for major mind expanding opportunities.
Definitely worth the money if you have an SQL package to attempt to solve the problems with.