Write SQL to compute max and min marks
IBMData Scientist · Online AssessmentLast updated
This question evaluates a candidate's ability to perform basic data aggregation in SQL, specifically computing summary statistics from a single table. It is commonly asked to assess competence in data manipulation and query result shaping within the Data Manipulation (SQL/Python) domain, focusing on practical application of SQL aggregation rather than purely conceptual theory.
Tables
marks
| column | type | notes |
|---|---|---|
| student_id | INT | primary key |
| marks | INT | not null |
Task
Write a SQL query that returns a single row with:
max_marks: the maximum value ofmarksmin_marks: the minimum value ofmarks
Output
A single row with columns (max_marks, min_marks).
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.