Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Consideration to move questions into a new section: nested queries #194
[What does this query do?] In order to find the differences of individual readings with the individual's average reading, I think we'd require nesting the query in the following manner:
At this stage, nesting is not introduced, and I think nesting deserves a new section by itself given its usefulness.
I think the next question [Ordering When Concatenating] also has the same issue (requires nesting).
I think the point with that question is not to get the result one might naïvely expect (which the query above is designed to produce) but rather to get the learner to reflect on how aggregation works and why the query doesn't produce what might be expected. I would suggest that at this point it is sufficient to make clear that a more sophisticated query is needed to get the desired result, and that it is out of the scope of the lesson.
An episode on nesting would need to come after the one on joins, and would require the introduction of aliases too. I suspect there just isn't the space in this lesson.