Student's Average Score

Company: Godrej_21dec

Difficulty: medium

Problem Statement

Problem Description You are given a table named students that stores the marks obtained by students across multiple subjects. Each row represents a single student's score in a specific subject. Write a SQL query to calculate the average score for each student across all subjects. The results should be ordered by student_id in ascending order. Schema Table: students Column Name Data Type Description student_id Integer The unique identifier for the student. name VARCHAR The name of the student. subject VARCHAR The name of the subject. score Integer The marks obtained by the student in the subject. Required Output The output should return the following columns in order: student_id (Integer) name (VARCHAR) avg_score (Decimal/Float) - The average score calculated across all subjects for the student, rounded to 2 decimal places . Constraints or Notes The output must be ordered ascending by student_id . The combination of (student_id, subject) is unique for each row. Note on Dialects: Since s