Katkat

Write SQL to compute max and min marks

IBMData Scientist · Online Assessment

Last 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

columntypenotes
student_idINTprimary key
marksINTnot null

Task

Write a SQL query that returns a single row with:

  • max_marks: the maximum value of marks
  • min_marks: the minimum value of marks

Output

A single row with columns (max_marks, min_marks).