Given 2 tables ‘Students’ and ‘Departments’. Write an SQL query to find the students who has the Lowest GPA in each of the departments.
Table: Students
Id:primary key
Table:Departments
DepartmentId of this table and DepartmentId of Students table are identical
NOTE : The output should contain one column by the name ‘A’ , which should contain DepartmentName , Name and GPA all seperated by a comma. Also the output should be sorted by DepartmentName .
Example :
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.