PowerSchool Group Interview Question

Solving a simple programming question and designing a database based on the information given