News for hackers. Stuff that matters.
Re:Ask HN: Junior SQL developers – How do you learn SQL? by fifilura on Thursday March 11, 2021 @01:09PM (#26427063)
Not so much about how I learned but how I teach.

Whenever I want to explain how one can do things in SQL I pull up a google/excel sheet and write down some sample data that resembles the problem.

When multiple tables are involved I just write the samples in two different locations within the same sheet.

After that I can just jot down the resulting table below (without writing the actual sheet commands) and maybe some instruction.

Makes all concepts very clear, for example when explaining n:m joins or window functions. Or just the general "table programming" concepts where you add columns rather than variables when you want something done.

Particularly well suited now in covid times when I have to explain things remotely.

SQL and sheets programming are just very closely related.

Re:Ask HN: Junior SQL developers – How do you learn SQL? by s-stude on Thursday March 11, 2021 @02:12PM (#26427782)
Yep...a plain spreadsheet or tables do the trick. It helps get away from the frustration of not knowing SQL and helps think just in table terms.
Re:Ask HN: Junior SQL developers – How do you learn SQL? by raarts on Thursday March 11, 2021 @05:58PM (#26430093)
This is exactly how I teach SQL to my students.