Live data from Hacker News

Show HN: Select Star SQL, an interactive SQL book

selectstarsql.com

31–40 of 121 posts

Re: Show HN: Select Star SQL, an interactive SQL book

#31

Sorry for being dense, or maybe there are pop ups that I'm not seeing? I'm missing how is this "interactive". Sorry

https://selectstarsql.com/frontmatter.html

Scroll down to Dataset.

After "I’ve prepared for this book:"

There is a little interactive code editor you can type in and run the query.

Re: Show HN: Select Star SQL, an interactive SQL book

#32
The choice of example database (the death penalty) is terrific.

So much more interesting, important and compelling than the usual tired customer/product examples.

I'm tired of seeing the implicit assumption around the place that software is just about business. Software should be about more than that.

Re: Show HN: Select Star SQL, an interactive SQL book

#33
post #31

Sorry for being dense, or maybe there are pop ups that I'm not seeing? I'm missing how is this "interactive". Sorry

https://selectstarsql.com/frontmatter.html Scroll down to Dataset. After "I’ve prepared for this book:" There is a little interactive code editor you can type in and run the query.

I was confused too. It appears the page does not work on Firefox. I get a "customElements is not defined" error in the console in Firefox and none of the interactive sections render.

The page works fine on Chrome.

Re: Show HN: Select Star SQL, an interactive SQL book

#34

Sorry for being dense, or maybe there are pop ups that I'm not seeing? I'm missing how is this "interactive". Sorry

Slightly embarrassing -- but the problem may be that the site isn't compatible with FireFox (at least pre-v63 FireFox). The site makes use of custom HTML elements which are not supported by default in pre-v63 FireFox (https://developer.mozilla.org/en-US/docs/Web/Web_Components/...). The good news is that all you need to do is to turn on a flag as set forth in the link provided. The bad news is that many other less tech-savvy people are going to be stymied by this.

edit: the site will now warn you if your browser is incompatible.

Re: Show HN: Select Star SQL, an interactive SQL book

#35
post #23
post #18

Earlier quoted context omitted.

All the blue boxes are actually interactive code editors. You can run arbitrary queries against the dataset in them. I changed some of the wording to make it clearer. Hopefully that helps!

I was wondering what you were talking about. What blue boxes? Then I saw the problem. The boxes showed up in Chromium but not Firefox.

Same here - the front matter page mentions web components - perhaps the support is different /disabled in Firefox?

The elements aren't visible in Firefox at all.

Re: Show HN: Select Star SQL, an interactive SQL book

#36
post #34

Sorry for being dense, or maybe there are pop ups that I'm not seeing? I'm missing how is this "interactive". Sorry

Slightly embarrassing -- but the problem may be that the site isn't compatible with FireFox (at least pre-v63 FireFox). The site makes use of custom HTML elements which are not supported by default in pre-v63 FireFox ( https://developer.mozilla.org/en-US/docs/Web/Web_Components/... ). The good news is that all you need to do is to turn on a flag as set forth in the link provided. The bad news is that many other less…

Also not working on Edge.

Re: Show HN: Select Star SQL, an interactive SQL book

#37
post #28

I really like this. Bookmarked. I have spotted a few bugs that you may want to check into. Search the page for the word “llanguage”. The sum/count checker told me it was incorrect for using lowercase nulls. I normally write all my sql lowercase for brevity, but I also mostly use sql server. I really like what you have done here and I hesitate to report it in your show hn thread because this really is great.

Thanks so much for the feedback! Both the typo and the validity-checking bug have been fixed.

Re: Show HN: Select Star SQL, an interactive SQL book

#38
post #7

This is gorgeous, and a great topic. No matter what field you're working in, understanding databases is extraordinarily valuable...and SQL is among the longest lasting techs I've ever learned (e.g. name another programming language that is as valuable today as it was 20 years ago, if not moreso). Even with the rise of NoSQL databases, I suspect we'll all still need to know a little SQL in another 20 years (and it was…

> name another programming language that is as valuable today as it was 20 years ago, if not moreso * C * Python * Java 20 years ago was 1998.

Sure, and I still use Perl as my primary language, just as I did 20 years ago, with some forays into other languages (like Python and C) along the way. But, this is survivor bias (one could argue SQL is also benefiting from survivor bias, though SQL was the dominant data query language then and it is the dominant data query language today, whereas one could argue only C was/is dominant in its space at both points in history). But, where's Pascal, Visual Basic (or Basic of any sort), Tcl, etc.? There's dozens of other languages that came and went, including data-oriented languages. All of which were popular during the 90s, and effectively gone now. And, only C among your examples is actually exhibiting the same kind of longevity (SQL is more than 40 years old, so it predates Python, Java, Perl, etc. by quite a lot)...I probably should have put the starting point for this thought experiment at 30+ years ago, but 20 years ago is when I first started using SQL, so it's what I used, which isn't really useful. Who cares when I learned the value of SQL, when it's an industry-wide phenomenon?

My point wasn't that one can't name languages with staying power. There are several. But, SQL is still special, I think. It's almost universally needed. If you go to work in a Node or Go shop today, you're probably still gonna need to know some SQL, just like if you went to work in a Python or Perl or Java shop in the 90s.

Re: Show HN: Select Star SQL, an interactive SQL book

#39
post #11

This is good intiative. We need to simplify pedagogy. On a related note, I always found the syntax of SQL to be great. Someone told me that simplicity of SQL made relational databases even more popular. It is one of the best designed language where even someone new to the field won't feel intimidated. I'm surprised designers of SQL haven't won the Turing Award yet.

I write a lot of sql and it is generally a nice language.

But for my taste the language is to close to English and therefore redundant and inconsistent in an annoying way. Example:

Select x from tbl ...

Delete from tbl ...

Update tbl set x=...

Why change the word order?

Re: Show HN: Select Star SQL, an interactive SQL book

#40
post #21

Earlier quoted context omitted.

I teach SQL to financial people and, for the most part, it isn't too bad. When I get to joins, I teach a subset of SQL where all joins are done through INNER JOIN / LEFT JOIN syntax and that helps a lot. Joins are the part that everyone has trouble with.

Tbh I usually see teachers worried about joins but its the group by/having clauses that I always watched people struggle with (at least, writing it). Ofc that might just be the emphasis on joins makes group by the next lowest hanging fruit

What do your abbreviations mean?
Post reply on HN