midterm solution around query in SQL
问题 This is the database: 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) The question asked is... Give the last name and SSN of the unmarried employees who work on two or more projects. SELECT e.Lname, e