Untitled

 avatar
user_9914919852
mysql
2 years ago
174 B
1
Indexable
Never
SELECT s.Name FROM students s, friends f, packages p, packages bfp
WHERE s.Id = f.Id AND s.Id = p.Id AND f.friend_id = bfp.Id AND bfp.Salary > p.Salary 
ORDER BY bfp.Salary