Question: FIGURE P7.1 THE CH07 CONSTRUCTCO DATABASE Database name: Ch07_ConstructCo Relational diagram Table name: EMPLOYEE EMP YEARS -Nov-00 50 102 21 22-An-08 00 00-93 600 1-Dec-95

FIGURE P7.1 THE CH07 CONSTRUCTCO DATABASE Database name: Ch07_ConstructCo Relational diagram Table name: EMPLOYEE EMP YEARS -Nov-00 50 102 21 22-An-08 00 00-93 600 1-Dec-95 50 23-00-99 50 rood Debert Table name: JOB Pre 5 75 75 romme Js 04J-05 510 Table name: ASSIGNMENT 100022 2 455 ?? 1206 Table name: PROJECT ?17 ?92 45360000 3500500 00 00230 00 103 110346 00 100 00345 20 102 09534-181 ens 131 29 76.01 541 45 4 55 105 ?17 Note that the ASSIGNMENT table in Figure P7.1 stores the JOB_CHG_HOUR values as an attribute (ASSIGN CHG_HR) to maintain historical accuracy of the data. The JOB_CHG_HOUR values are likely to change over time. In fact, a JOB_CHG_HOUR change will be reflected in the ASSIGNMENT table. Naturally, the employee primary job assignment might also change, so the ASSIGN_JOB is also stored. Because those attributes are required to maintain the historical accuracy of the data, they are not redundant. Given the structure and contents of the Ch07_ConstructCo database shown in Fig- ure P7.1, use SQL commands to answer the following problems 1. Write the SQL code required to list the employee number, last name, first name, and middle initial of all employees whose last names start with Smith. In other words, the rows for both Smith and Smithfield should be included in the listing. Sort the results by employee number. Assume case sensitivity
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
