Question: SQL Create a view listing the incorrect record in the Working table that staff has project year before their birthday. You should use Staff2, Project
SQL
Create a view listing the incorrect record in the Working table that staff has project year before their birthday. You should use Staff2, Project and Working tables. You need to figure out how to get the year from the birthday. The output column header should be (Project_name, year, Staff_name, birthday). The staff_name should combine fname and lname with a space in between.
Staff2

Project

Working 
| staffNo | fName | iName | position sex | DOB | salary | branchNo | superno | ABCi | CCI | SAS | SG14 | SG37 | SG5 | SL21 | SL41 | XY1 | New | Enginer | Intern IM | Super | User | DBA IM | Mary | Howe | Assistant | IF | David | Ford | Supervisor | M | Ann | Beech | Assistant | F | Susan | Brand | Manager | F | John | White | Manager | M | Julie | Lee | Assistant | F | New | Tester | Assistant | 2000-01-01 | 9000.00 | B002 | 1995-01-01 | 90000.00 | B005 | 1970-02-19 | 9000.00 | B007 | 1958-03-24 | 18000.00 | B003 | 1960-11-10 | 12000.00 | B003 | 1940-06-03 | 24000.00 | B003 | 1945-10-01 | 30000.00 | B005 | 1965-06-13 | 9000.00 | B005 | 1990-01-01 | 8000.00 | B002 | SL21 | SG14 | SG5 | SGS | SG5 | SL21 | NULL | SL21 | SL21 | pcode | name | city 1 +- -+- | POI University | Union | PO2 | Citi Bank | NYC | P03 | British Museum | London | PO4 | Buckingham Palace | London | | P05 | Granite | | Aberdeen | --+ pcode | staffNo 1 year | POI | POI POI PO2 PO2 | PO2 PO2 PO3 PO3 PO3 PO3 | P03 | ABC1 | ABCl | SG5 | XY1 | SG5 | SG5 | SL21 | ABCI | SG37 | SG14 | cci | ccl | 1980 | | 2010 | | 2000 | | 2014 | | 2002 | | 2018 | | 2006 | | 1995 | 1995 | 2003 | | 1990 | | 2019 | -+
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
