Untitled

 avatar
unknown
plain_text
3 years ago
366 B
4
Indexable
select name
from
(select name,salary, friend_id, 
(select salary from students,packages where students.id = friend_id and students.id = packages.id) as student_salary
from students, packages,friends
where students.id = packages.id and students.id = friends.id
order by salary
) as output
where output.salary < output.student_salary 
order by student_salary;
Editor is loading...