MoreCompany companygovtid cname hqloc employeefname minit ln
MoreCompany
company(govt_id, cname, hq_loc)
employee(fname, minit, lname, ssn, bdate, supervisorssn, address, gender, salary, dno)
dept_locations(govt_id, dnumber, dlocation)
skillset(ssn, skill_no)
skills(skill_no, skill_desc)
NOTE: dno and dnumber both represent the department number.
Write SQL DML for More_Company -
1. Retrieve the name of each employee who has a manager whose social security number is 987654321. Make sure you use a nested query.
2. Retrieve all skillsets and all skills matched on skill_no where possible.
Solution
Query :
1. SELECT fname FROM (SELECT fname FROM employee WHERE supervisorssn=987654321);
2. SELECT * FROM skillset,skill WHERE skillset.skill_no=skill.skill_no;
*****************END************PLS GIVE ME GOOD RATING****************************************
