How would you handle three coding questions on HackerRank where you have to use Python?
For the SQL version, use the supplied HackerRank assessment tables to summarize candidates who attempted all three required questions. Include candidates even when some submissions failed, and treat multiple submissions to the same question as one attempted question.
Output
- One row per candidate who attempted all three required questions.
- Return
candidate_name, attempted_questions, solved_questions, and average_passed_runtime_ms.
- Sort by
solved_questions descending, average passed runtime descending with NULL values last, then candidate_id ascending.
Output details
- Treat the required questions as question numbers
1, 2, and 3.
- Count a question as solved when at least one submission has status
Passed.
- Calculate the average from all
Passed submissions' runtime values, returning NULL when none exist.
- Round
average_passed_runtime_ms to two decimal places, preserving trailing zeroes.