I have this self-related table:


SSN Name salary Manager
111 Jim 1000 222
222 Jack 3000
333 Jerry 2000 111

The query problem is: list the eployees' ssn and name whose salary is less than 3/5 of his managers:

I tried this one but always fails:

select a.ssn, a.name
from employee as a join employee as b on (a.manager=b.ssn)
where a.salary<(3/5)*b.salary;

A little bit confused, how can i build the self-related tables and make the query right?
Mnay thanks!!!