CDN$ 79.55
  • List Price: CDN$ 89.41
  • You Save: CDN$ 9.86 (11%)
Only 1 left in stock - order soon.
Ships from and sold by Gift-wrap available.
Joe Celko's SQL for Smart... has been added to your Cart
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 3 images

Joe Celko's SQL for Smarties: Advanced SQL Programming Paperback – Oct 18 2010

See all 2 formats and editions Hide other formats and editions
Amazon Price
New from Used from
Kindle Edition
"Please retry"
"Please retry"
CDN$ 79.55
CDN$ 73.05 CDN$ 87.20

There is a newer edition of this item:

Harry Potter and the Cursed Child
click to open popover

No Kindle device required. Download one of the Free Kindle apps to start reading Kindle books on your smartphone, tablet, and computer.
Getting the download link through email is temporarily not available. Please check back later.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your mobile phone number.

Product Details

  • Paperback: 816 pages
  • Publisher: Morgan Kaufmann; 4 edition (Nov. 1 2010)
  • Language: English
  • ISBN-10: 0123820227
  • ISBN-13: 978-0123820228
  • Product Dimensions: 19 x 4.7 x 23.5 cm
  • Shipping Weight: 1.7 Kg
  • Average Customer Review: Be the first to review this item
  • Amazon Bestsellers Rank: #415,740 in Books (See Top 100 in Books)
  •  Would you like to update product info, give feedback on images, or tell us about a lower price?

  • See Complete Table of Contents

Product Description


"This book is a classic, and this revision will merely solidify its position." --Rudy Limeback

"This book focuses on the problems of standardization and the related problems of measurements. It is clearly intended to encourage designers to at least be aware of the problems, before their database designs go live."--Jeffrey Putnam, October 2010,

From the Back Cover

SQL for Smarties was hailed as the first book devoted explicitly to the advanced techniques needed to transform an experienced SQL programmer into an expert. Now, 15 years later and in its fourth edition, this classic reference still reigns supreme as the only book written by a SQL master that teaches programmers and practitioners to become SQL masters themselves! These are not just tips and techniques; also offered are the best solutions to old and new challenges. Joe Celko conveys the way you need to think in order to get the most out of SQL programming efforts for both correctness and performance. New to the fourth edition, Joe features new examples to reflect the ANSI/ISO Standards so anyone can use it. He also updates data element names to meet new ISO―11179 rules with the same experience-based teaching style that made the previous editions the classics they are today.

See all Product Description

Customer Reviews

There are no customer reviews yet on
5 star
4 star
3 star
2 star
1 star

Most Helpful Customer Reviews on (beta) HASH(0x9f9486cc) out of 5 stars 22 reviews
11 of 11 people found the following review helpful
HASH(0x9fa46c84) out of 5 stars Some good coverage of advanced topics, with some issues July 21 2012
By King B - Published on
Format: Paperback Vine Customer Review of Free Product
This book attempts to go over some advanced topics in SQL programming. While it succeeds in showing these concepts, the main issue is that the implementations are too generic and don't work in every implementation of SQL. It would be nice to see a table or indication of some sort that shows if the topic discussed works in an individual implementation of SQL. As I read a section that sounded great, I would test it out in Microsoft SQL server only to find that it was not supported. It would be nice to know if what was discussed was available in any SQL implementation or if it was only part of the ANSI SQL XX standards. He talks to SQL-92 standards that he says are not implemented in many (or any!) database engine... That does not help.
For the items that are applicable, they are so specific, I can't image any time that I would need them. For example matrix multiplication and graph theory.
On the advanced topics, the real good ones are covered in more detail in his other books. I would recommend Joe Celko's Trees and Hierarchies which goes into more detail from the trees section in this book.
Overall, I'm glad I reviewed this book, but I would like to see a language specific version that provided working examples.
7 of 7 people found the following review helpful
HASH(0x9f9ee6fc) out of 5 stars Celko Rules! Dec 6 2010
By Darwin's Bulldog - Published on
Format: Paperback Vine Customer Review of Free Product
I learned SQL from the first edition of this book, many years ago. Some of the material covered in that edition has been moved to different books and this basically reflects the emergence of SQl as the lingua franca of databases and the burgeoning demands placed on developers. So in some cases, the reader may have to look at other texts for specific coverage of items sch as Trees and Heirarchies.

What I have always liked about Joe Celko's books is that once you start reading, it's hard to stop. He likes to explain why the SQL standards are written the way they are, often including why SQL databases are not as portable as might be expected. Since his books are not vendor specific, he can provide tips and hints, and in some cases what NOT to do, for several of the main vendors. There is much pedigogy presented; perhaps not always of direct value, but certainly interesting.

Joe lays a substantial foundation about data types, NULLS, implementation and the set theory basis of SQL. In fact the basic SELECT statement does not even get detailed attention until Chapter 24. But remember, this is a book for 'Smarties' and many of the difficulties of getting SQL to return specific result sets are presented in earlier chapters. Some familiarity with the language will be required.

After Chapter 24, the examples are many and the number of data retreival issues covered many: simple aggregates, OLAP, statistics, matrices, UNIONs, graphs, temporal queries, and optimization (even FoxPro gets a tip of the hat for speed).

Highly recommended!
7 of 7 people found the following review helpful
HASH(0x9fa5d054) out of 5 stars Superb Development Dec 14 2010
By Santeria - Published on
Format: Paperback Vine Customer Review of Free Product
After Learning the Basics of SQL as well as the admin side of Oracle SQL, the knowledge of how far SQL has developed in terms of being a language that gets data from one person to another, is quite an amazing piece of work, and the glitz for most people who see the result is in the User Interface, since they never see the hard work that goes on underneath the main part of an SQL data machine.
This book takes you through Tables as entities, tables as relationships, and the idea of Rows versus records.In the "great Schema" of things, Transactions and concurrency control is explained and illustrated in detail.Coming from the detail of Schema level Objects to the various types of Tables and the language issues from the earliest SQL to the later XML forms, it is all illustrated in this book for those who wish to work with the Core Essential that is SQL.
6 of 6 people found the following review helpful
HASH(0x9fbe7480) out of 5 stars Some new material, But Not Enough To Pay for New Versus Older Editions Dec 3 2010
By Amazon Customer - Published on
Format: Paperback Vine Customer Review of Free Product
By now, Joe Celko's books have become SQL programming standards. This title, "SQL for Smarties" is now in its 4th edition, and covers a wide mix of things a SQL programmer would want to know about, after learning the basics of SELECT..WHERE, such as date/time math, advanced queries, and odds and ends like calculating medians across records.

With books like "SQL for Smarties", which have been around long enough, readers have the choice of paying for the newest edition or saving their money by buying an older edition. I happen to own the second edition, and I notice that material from that edition has been re-arranged, and several new chapters have been introduced. Unless one requires something available only in the latest edition, I recommend finding an older edition.

To put this review in context, I have many years of experience writing in procedural programming languages, but only occasionally develop SQL code.
5 of 5 people found the following review helpful
HASH(0x9fe0d4bc) out of 5 stars Great Content Horribly Written Aug. 9 2013
By Robert - Published on
Format: Kindle Edition Verified Purchase
This book has some fantastic information in it on how to properly write SQL code, especially from the perspective of a programmer in a structured language. The major glaring problem with the book is its editing. There are typos everywhere, many of them in code examples, which breaks them. Additionally large portions of the text are copied from chapter to chapter, probably making up 5% of the book. This seems lazy and also makes the book more confusing as you get a nagging feeling of deja vu. With a good editor this book might be worth 5 stars. As it is the book is only 3, causing a lot of confusion and problems where there shouldn't be any.