93

Subject Pass Rate

HardCASEconditional aggregationpercentage

Problem Description

Write a SQL query to calculate pass rate (marks >= 70) for each subject.

Expected Columns

  • subject_name
  • total_students
  • passed
  • pass_rate

Example Output

| subject_name | total_students | passed | pass_rate | |--------------|----------------|--------|-----------| | Mathematics | 15 | 14 | 93.33 | | Physics | 10 | 8 | 80.0 | | ... | ... | ... | ... |

Hints

Unlocks after 2 more attempts
Submit your solution to unlock hints
//#93 Subject Pass Rate
Hard

Loading schema...

Loading editor...

No results yet

Run a query to see results