PineBridge Investments interview question

1. SQL: there are three tables, Table Students with fields (StudentID, LastName, FirstName, …), table Subjects with fields (SubjectID, SubjectName, Credit), and table Grades with fields (StudentID, SubjectID, Grade). Write a query to calculate GPA for each student.