SQL for Devs

Learning and science

sql tutorial ebook

SHOW HN2022

Legend

SQL for Devs

A free eBook about many lesser-known/secret database tricks

sqlfordevs.com

#sql#database tips#postgresql#mysql#query optimization

865points
174comments
#13of 2,570 in 2022
Top 1%of 2022 by points

How HN took it

DebatedReal support and real criticism

39 positive, 22 neutral or asking, 5 mixed, 27 critical, out of 93 comments about the project. Thread score +0.13.

Idea: 15 for, 4 againstExecution: 4 for, 10 againstPrivacy: 1 for, 6 againstPricing: 5 for, 2 againstDocs: 2 for, 3 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Useful tricks, well put together

    From 3 comments
    • Nice. I presume this is for a flavour e.g. Postgres?
      quickthrower2 on HN
    • It might be worthwhile mentioning somewhere that this is for mysql and postgres. While it does look really handy and well put together, unfortunately none of the tips in the book…
      px1999 on HN
    • I'm fairly adept at writing queries and have been using MySQL for what seems like an eternity. The multiple aggregates per query thing kinda blew my mind. I've certainly done…
      WesleyJohnson on HN
  • Thanks for making it free

    From 2 comments
    • Thank you for making this available, and for free. Nice work.
      jmhnsn on HN
    • This looks great! Awesome that you made it free, but fyi I would have paid you $5-10 for this in a heartbeat.
      danenania on HN

Objections

  • Email wall is off-putting

    From 3 comments
    • I have a very negative reaction to sites that require an email to get something of unknown value. Automatic no.
      adamc on HN
    • Book looks good, shovelling the subscription at me was annoying and of course I used a throwaway address and unsubscribed immediately. It's actually probably a newsletter I…
      throwaway81523 on HN
    • Maybe it's me but I wasn't shown a free ebook. I was shown a "give me you PII so I can spam you" trap website. If you ask me to give you my PII then it's not free, is it? Are you…
      fefe23 on HN
  • Examples are MySQL/PostgreSQL only, not MSSQL

    From 2 comments
    • It might be worthwhile mentioning somewhere that this is for mysql and postgres. While it does look really handy and well put together, unfortunately none of the tips in the book…
      px1999 on HN
    • The tricks for MySQL and Postgres are very different than MS SQL; some exist in a different form, some have no equivalent. It would be useful to have a side by side for all major…
      AdrianB1 on HN
  • Technical errors in some examples

    From 3 comments
    • Nice effort on an interesting topic. However, the book could use a better technical review. For example the first recipe will not work as expected with out a multi-column unique…
      timemachine on HN
    • ``` -- MySQL SELECT * FROM example WHERE NOT(column <> 'value'); -- PostgreSQL SELECT * FROM example WHERE column IS DISTINCT FROM 'value'; ``` That doesn't seem equivalent?
      remram on HN
    • Might there be an error in "Simplified Inequality Checks With Nullable Columns" for mysql? NOT(column <> 'value') seems to be wrong Did you mean NOT(column <=> 'value') ?
      benjy77 on HN
  • Email delivery failing or landing in spam

    From 2 comments
    • Gmail started to mark the email with the PDF as spam. It worked perfectly before this trended on hn. I guess I triggered some rate-limiting rule. If you activate the subscription…
      tpetry on HN
    • Gmail now started to classify the email with the ebook attachment as spam. After having worked without any problems before. I am now changing my code, give me a few minutes. Fixed
      tpetry on HN

Requests

  • Window functions coverage

    From 1 comment
    • This was a great read, but I was surprised not to see window functions in here. They are so powerful and I'd estimate that less than 10% of developers I've worked with even know…
      Ozzie_osman on HN
  • Side-by-side SQL flavor comparison

    From 1 comment
    • The tricks for MySQL and Postgres are very different than MS SQL; some exist in a different form, some have no equivalent. It would be useful to have a side by side for all major…
      AdrianB1 on HN
  • Example query results

    From 1 comment
    • This is great! Really appreciate you giving this out for free. Only critique is that it would be super useful to include some example query results for each section so show the…
      nop_slide on HN
  • Publish source on GitHub

    From 1 comment
    • Thanks. One suggestion: Could you put all materials in github for contribution ?
      revskill on HN

Questions

  • Why require email instead of ads or open access

    From 2 comments
    • Honest question- why does one choose to harvest emails for something like this vs just putting ads on the page? I have seen this model used for several ebooks, but it seems like…
      kevstev on HN
    • I get the frustration about the email, but that aside, I do wonder whether requiring the email before getting the book is the most effective mechanism for your end goal. What do…
      cdrini on HN
  • Which SQL flavor the book targets

    From 2 comments
    • Well, for example, intro doesn’t say which SQL flavor the author is targeting. As a MSSQL user I wouldn’t want to share my email in exchange for MySQL tricks
      qiller on HN
    • Nice. I presume this is for a flavour e.g. Postgres?
      quickthrower2 on HN

Alternatives named

  • SQL Performance Explained by Markus Winand

    From 2 comments
    • Book looks good, shovelling the subscription at me was annoying and of course I used a throwaway address and unsubscribed immediately. It's actually probably a newsletter I…
      throwaway81523 on HN
    • some more tips and tricks https://blog.jooq.org/sql/ https://winand.at/sql-slides-for-developers
      overtomanu on HN
  • jOOQ SQL blog

    From 1 comment
    • some more tips and tricks https://blog.jooq.org/sql/ https://winand.at/sql-slides-for-developers
      overtomanu on HN
  • Brent Ozar sp_blitz

    From 1 comment
    • Awesome, thank you. If you are on Microsoft SQL Server I additionally recommend to take a look at Brent Ozars sp_blitz[1] script collection and the according youtube series. Many…
      sandreas on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/33833836)