.webp&w=3840&q=100)
Industry
sports
Skills
approach
data-wrangling
Tools
sql
Learning Objectives
Learn how to define and write SQL functions that accept parameters and return calculated results, improving query reusability and flexibility.
Develop skills in using aggregate functions like SUM, COUNT, and CASE to perform conditional summation, counting, and other operations for analyzing match statistics.
Overview
In the IPL, Net Run Rate (NRR) is a vital metric for teams to monitor, as it helps determine their standing in the points table. It reflects a team’s overall performance and can be the deciding factor in qualification.
Your task is to create a function that calculates the NRR for a given team in a specified season. The function will take the season and team as inputs and return the team’s Net Run Rate for that season.
Prerequisites
- Ability to write SQL functions, that accept parameters and return calculated results.
- Familiarity with using CTEs to break down complex queries into manageable parts
- Proficiency in using aggregate functions like SUM, COUNT, and CASE