Exercise: Document a Query
Add a multi-line comment explaining this query.
Solution
sql
1/*
2 Query: High achievers by course
3 Purpose: Find students scoring above 85
4 in their respective courses
5*/
6SELECT course, name, marks
7FROM students
8WHERE marks > 85
9ORDER BY course, marks DESC;Comment Summary
| Type | Syntax | Use |
|---|---|---|
| Single | -- comment | Quick notes |
| Multi | /* comment */ | Long explanations |
