You are viewing a single comment's thread. Return to all comments →
select name from ( select s.name ,(select Salary from Packages fin where fin.ID =f.Friend_ID ) Fsalary ,p.Salary ,(select Name from Students fin where fin.ID =f.Friend_ID ) FName ,case when p.Salary < (select Salary from Packages fin where fin.ID =f.Friend_ID ) then 'Higher' end status from Students s left join Friends f on s.id=f.id left join Packages p on s.id=p.id ) tbl where tbl.status='Higher' order by Fsalary
Seems like cookies are disabled on this browser, please enable them to open this website
Placements
You are viewing a single comment's thread. Return to all comments →