Question: Answer these questions INSERT INTO EMPLOYEE VALUES (101,' 'Adam',' Smith','Manager', 102,' 1998-04-12') ; INSERT INTO EMPLOYEE VALUES (102, 'Marry', 'Jane', 'CEO',NULL, '1997-01-18') ; INSERT INTO

 Answer these questions INSERT INTO EMPLOYEE VALUES (101,' 'Adam',' Smith','Manager', 102,'1998-04-12') ; INSERT INTO EMPLOYEE VALUES (102, 'Marry', 'Jane', 'CEO',NULL, '1997-01-18') ;

Answer these questions

INSERT INTO EMPLOYEE VALUES (103, 'Eliza',' Rynd','Manager', 102, '1999-03-07') INSERT INTO EMPLOYEE

VALUES (104,'Imran',' Khan','Sales', 101, '2003-04-17'); INSERT INTO EMPLOYEE VALUES (105,' Wally', 'Ham','

INSERT INTO EMPLOYEE VALUES (101,' 'Adam',' Smith','Manager', 102,' 1998-04-12') ; INSERT INTO EMPLOYEE VALUES (102, 'Marry', 'Jane', 'CEO',NULL, '1997-01-18') ; INSERT INTO EMPLOYEE VALUES (103, 'Eliza',' Rynd','Manager', 102, '1999-03-07') INSERT INTO EMPLOYEE VALUES (104,'Imran',' Khan','Sales', 101, '2003-04-17'); INSERT INTO EMPLOYEE VALUES (105,' Wally', 'Ham',' Sales', 101,'2006-06-21') INSERT INTO EMPLOYEE VALUES (106,' Jack', 'Hobbs', 'Sales', 101,'2000-07-12') ; INSERT INTO EMPLOYEE VALUES (107,' Don','Bradman', 'Advertising', 101, '2014-09-18'); INSERT INTO EMPLOYEE VALUES (108, 'Nawab', 'Pat', 'Accounts', 103, '2008-02-02') ; INSERT INTO EMPLOYEE VALUES (109,' Jack', 'Odumbe', 'Accounts', 103,'2016-03-01') ; INSERT INTO SHIFT VALUES (1, 'Monday', 0900,1700); INSERT INTO SHIFT VALUES (2, 'Tuesday", 0900,1700); INSERT INTO SHIFT VALUES (3,'Wednesday", 0900,1700); INSERT INTO SHIFT VALUES (4, "Thursday", 0900, 1700); INSERT INTO SHIFT VALUES (5, 'Friday', 0900,1700); INSERT INTO SHIFT VALUES (6, ' Friday', 1200,2000); INSERT INTO SHIFT VALUES (7, 'Saturday', 0900,1700); INSERT INTO SHIFT VALUES(8, 'Saturday", 1200, 2000); INSERT INTO SHIFT VALUES (9, 'Sunday', 1000,1600); INSERT INTO TRANSACTION VALUES (1001,1005,1001,105,20180412,20180422,20180426 '); INSERT INTO TRANSACTION VALUES (1002,1006,1004,104,20180418,20180428,20180429); INSERT INTO TRANSACTION VALUES (1003,1003,1005,104,20180412,20180421,20180422 '); INSERT INTO TRANSACTION VALUES (1005,1008,1006,106,20180421,20180423,20180425 '); INSERT INTO TRANSACTION VALUES ( 1006,1001,1001,106,20180421,201804299,20180521); Write a query to display all information about the manager who manages the greatest number of employees. Hint: The manager column in the employee table contains elD (employee ID) for Managers. [2 marks] Task 26 Write a query to display each employees' fName, IName, and commission. Commission is calculated as 2.5% of the transaction value. Hint: Have a look at the transaction table and you will find the employee who was responsible for each transaction. [3 marks] Task 27 This task requires you to allocate shifts to employees. You can manually decide which employee works which shift as long as you follow the following rules: 1. No employee will work more than 38 hours 2. Each shift will have a manager or CEO. How this is implemented is up to you. One approach may be to add new columns to the existing shift and employee tables, or you could instead create a new table all together. Hint: This is a typical "many to many" relationship as one shift can have many employees and each employee can be part of multiple shifts. Note: You can write up to three queries to complete this task (the fewer the better though). [4 marks] Task 28 Write a query to display the employees who will be working today. You should use a built-in function to identify which day of the week it is today. Use this day to extract information form the timetable (tTask 27)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!