SQL - Advanced 8

The goal of this quest series is to improve your SQL skills
Goals
- Improve your SQL skills
Codewars Katas
Solve the following Codewars Katas:
↗
SQL Basics: Create a FUNCTION (DATES)
codewars.com
↗
Calculating Batting Average
codewars.com
Challenge
Codewars Katas
Once you have completed the katas, you can validate this quest yourself.