sql-ecology-lesson
sql-ecology-lesson copied to clipboard
01-sql-basic-queries: adding basic information on SQL code at the begining
When learning to write my first queries, I was missing a couple of information, which are given in later.
-
The ";" I would be good to explain what is the role of the comma (the query works without it, why bother?)
-
Line breaks The learner needs to know whether line breaks are necessary for the code to work. The information is given at the end of the episode, and I suggest to move it here, at the very begining.
It is possible to write a query as a single line, but for readability, we recommend to put each clause on its own line.
- Indentation I suggest to mention that indentation is also possible, and can improve code readibility at that point.
Thanks for these suggestions!
I think (1) would be great as a callout box -- it's not essential to continuing with the examples but would be good to have in the lesson somewhere.
Your suggestion for (2) makes sense to me, particularly since we use line breaks from the beginning. We don't really use indentation in the lesson, but could add a note about (3).