sql-ecology-lesson icon indicating copy to clipboard operation
sql-ecology-lesson copied to clipboard

Calculations in a SELECT query do not append data to the source table

Open maneesha opened this issue 1 year ago • 1 comments

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

maneesha avatar Mar 02 '24 00:03 maneesha

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?

jd-foster avatar Mar 15 '24 11:03 jd-foster