You are given 3 tables namely ‘Students’ , ‘Departments’ and ‘Jobs’.
Write an SQL query to find sum of Distinct salaries obtained by students from ‘CSE’ department. The output should be sorted by the Department names.
Note: There might be students who have got multiple job offers.
Table: Students
Id:primary key
Table:Departments
DepartmentId of this table and DepartmentId of Students table are identical
Table: Jobs
Id of this table and Id of Students table are identical.
NOTE : The output should contain one column by the name ‘Salary’ .
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.