Add a new check on the emp table to make sure that any new employee inserted has sex either \'M\' or \'F\'. Create a new table called highway, with columns: empid and salary, and insert only those employees into this new table whose salary is greater than $40000. Write an SQL query that would return the department name and the maximum salary of that department (of only Male employees, i.e. Female employees should not be included). Using the IN operator, write a SQL statement that would return the first name, last names and the department names of those in \'MEN CLOTHING\' or \'WOMAN CLOTHING Display only those department names, and average salaries (rounded to the nearest dollar) of only those departments whose average salaries are greater than $33000. Create a view called ernp_manager_deptname with the employee last name (upper cased), manager name (lowercased) and the department name (lowercased) of each employee. Grant only view and change rights to the columns fname, lname and ssn to everyone. Create an INDEX for the emp table called indSSN on the column ssn and salary. Drop the index and revoke the grant Assume that there exists another column in the emp table called datejoined (which contains the date when the employee joined the company). Write a SQL query that gives the first name, last name and the number of days employed in the company. Solution 1. ALTER TABLE emp ADD CHECK (sex=\'M\' OR sex=\'F\') 2.create table highpay(empid int,salary int) insert into highpay select empid,salary from emp where salary>40000 3.select d.deptname,max(salary) from emp as e,dept as d where e.deptno=d.deptno and e.sex=\'M\' group by d.deptname 4.select e.fname,e.lname,d.deptname from emp as e,dept as d where e.deptno=d.deptno and deptname IN (\'MEN CLOTHING\',\'WOMAN CLOTHING\') .