EMPLOYEE (fmane, minit, lname, ssn, birthdate, address, sex, salary, superssn, dno) KEY: ssn
DEPARTMENT (dname, dnumber, mgrssn, mgrstartdate) KEY: dnumber.
PROJECT (pname, pnumber, plocation, dnum) KEY: pnumber.
WORKS_ON (essn, pno, hours) KEY: (essn, pno)
DEPENDENT (essn, dependent-name, sex, bdate, relationship) KEY: (essn, dependent-name)
I want to get first and last names and ssn of each female employees with no dependents, but I get stuck at the final command part:
select e.lname, e.fname, e.ssn
from employee e
where e.ssn not in (
select essn
from dependent
)
how do I add the gender part?