sql-ecology-lesson
sql-ecology-lesson copied to clipboard
Calculations in a SELECT query do not append data to the source table
How could the content be improved?
A SELECT query never modifies the source table. In this lesson we say "When we run the query, the expression weight / 1000 is evaluated for each row and appended to that row, in a new column." This can be misleading because the query does not actually append a column to that table.
Which part of the content does your suggestion apply to?
https://datacarpentry.org/sql-ecology-lesson/01-sql-basic-queries.html#calculated-values
The assertion in the lesson is not that it modifies the source table (in this case surveys), but that the result of the query has a new column that wasn't in the table previously (weight / 1000). Perhaps we could clarify by saying in a new column of the table returned by the query?