Closed AlfAWolf140 closed 7 years ago
Thanks @AlfAWolf140. Is this comment related to the SQL lesson rather than the spreadsheet one?
Ah sorry - did I end up putting it in the wrong section? Yes it should be related to SQL lesson.
On 30 May 2017 16:49, "Tracy Teal" notifications@github.com wrote:
Thanks @AlfAWolf140 https://github.com/alfawolf140. Is this comment related to the SQL lesson https://github.com/datacarpentry/sql-ecology-lesson rather than the spreadsheet one?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datacarpentry/spreadsheet-ecology-lesson/issues/193#issuecomment-304922207, or mute the thread https://github.com/notifications/unsubscribe-auth/Abt4MwbnvuWclC8VzDla3nloXPgClBqwks5r_Dp6gaJpZM4NqTma .
Moved to correct place.
When I was teaching the lesson earlier I noticed that AS is used in the IFNULL and NULLIF sections before it's taught in the ALIAS section. This meant that I ended up explaining it twice. I don't know which would be the better option, but I'd like to suggest either:
a) Remove the AS statements from the following SELECT species_id, plot_id, NULLIF(plot_id, 7) AS partial_plot_id FROM surveys;
SELECT species_id, sex, IFNULL(sex, 'U') AS non_null_sex FROM surveys;
b) Move the alias section above the IFNULL and NULLIF sections