
Joe Celko's SQL for Smarties
by Joe Celko · first published 1995
13mentions
10recommended by
13HN commenters
2009–2020first – last mentioned
77% recommend23% neutral
Why HN recommends it
An advanced SQL guide covering how to use SQL well beyond the basics. It suits working developers who rely on ORMs and want a deeper grasp of relational thinking and queries.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.



Fans of this will probably also like Joe Celko's SQL for Smarties. ISBN: 0123693799 It's unfortunate that a lot of new programmers are relying on their framework's ORM to abstract the SQL away from them, weakening their understanding of it.
on “Awesome SQL blog” ↗…people admittedly may have little experience with Hadoop or other non-relational processing and storage, sounds like some HN folks have actually had little experience with the SQL they are disparaging. Joe Celko's SQL for Smarties is full of great explanations of how to really use SQL, and is worth picking up if you want to see what SQL can really do and work around it's (many) warts. http://www.amazon.com/Joe-Celkos-SQL-Smarties-Programming/dp...
on “MySQL: Find records in one table that are not in another - revised” ↗…Windows land. MySQL later if you have to. It's fallen out of favor in some communities since Oracle bought it and it's just not as powerful as PostgreSQL though it does the job. Also go buy the book "Joe Celko's SQL for Smarties" [1] (And everything else he wrote on SQL...) and actually learn what SQL and DDL is really all about how to properly model data. Lean some SQL and DDL before you start messing with ORMs like Rails Active…
on “Ask HN: which database should I learn.” ↗Joe Celko's SQL for Smarties. Tufte's Visual Display of Quantitive Information. Donald Norman's Design of Everyday Things.
on “Ask HN: What books do you keep on your desk?” ↗(disclamer: I have more than a decade experiences in doing SQL) I would say Mr. Joe Celko's "SQL for smarties" (and basically anything he has written (look him up for references).... I have had the opportunity to talk to mr. Celko, and he added (as I asked him what he thought was the best database-book) the…
on “Is there a K&R for SQL?” ↗…platform. Optimizing Oracle Performance https://books.google.com/books?id=D7ElCwAAQBAJ&printsec=fron... Another great book that explains the process of approaching and solving performance problems. Joe Celko's SQL For Smarties https://books.google.com/books?id=i-19BAAAQBAJ&printsec=fron... Everyone writing SQL should read Joe.
on “Techniques for Microsoft SQL database design and optimization” ↗Joe Celko's "SQL for Smarties" ... and then the other SQL books by Celko
on “A beginners guide to thinking in SQL” ↗Joe Celko's "SQL For Smarties" and "SQL Puzzles and Answers" are classics in the field. They're still very relevant despite being 10+ years old, since SQL hasn't changed anywhere near as much as, say, Java in that time. http://www.celko.com/books.htm
on “Ask HN: Best Book for learning SQL?” ↗…Ramakrishnan & Gehrke's Database Management. It was OK but there's a certain amount of at-the-time trendy bullshit that to me detracts from a focus on relational databases for their own sake. Edit 2: and Joe Celko's SQL for Smarties contains good oil on the relational paradigm.
on “Redshift Performance and Cost” ↗…Relational databases, declarative SQL, functional pure programming are good solutions for reporting. And you should certainly learn SQL if you want to do any applications with ORM or without. I recommend Joe Celko's SQL for Smarties: Advanced SQL Programming. Object oriented languages shine when there is a need to create a precise language that facilitates fast and robust communication between domain experts and developers. In situations…
on “What ORMs have taught me: just learn SQL (2014)” ↗Joe Celko's SQL for Smarties (https://www.oreilly.com/library/view/joe-celkos-sql/97801280...) and "Learn X the Hard Way" (Python, Java, C/C++, etc.) also play on the "for idiots/dummies" motif.
on “Information Theory for Intelligent People (2018) [pdf]” ↗i think this originated from joe celko's sql for smarties: http://books.google.com/books?id=P1o4lxVnExsC&pg=PA340&#...
on “How to multiply numbers in a column in MySQL” ↗A few thoughts: 1) Great information! 2) It seems like the world could use a book like Joe Celko's "SQL For Smarties", but for search engines. Yes, there are such books already, most notably O'Reilly's "Google Hacks" by Rael Dornfest, Paul Bausch, Tara Calishain -- but I think the world could still use a book covering…
on “Dorking: the use of search engines to find very specific data” ↗