Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. DATABASE PLEASE TYPE ANSWER Write the DQL for the following: All Employees, t

ID: 3816205 • Letter: 2

Question

2. DATABASE PLEASE TYPE ANSWER

Write the DQL for the following:

All Employees, their titles, salaries, and the department they work for making over fifty thousand dollars.

All department manager’s information, his or her department information, and start date.

Total salary paid to all employees in each department.

Average number of managers per department.

Total number of department managers.

salaries emp-no INT (10) salary INT(11 from date DATE to date DATE Indexes titles emp no INT(10 title VARCHAR(50) from date DATE to date DATE Indexes employees emp-no INT(10) LH birth date DATE first name VARCHAR(14) last name VARCHAR(16) gender ENUM (M', F) hire date DATE Indexes dept manager dept no CHAR(40 emp no INT(10) from date DATE to date DATE Indexes dept emp emp no INT(10) dept no CHAR(4) from date DATE to date DATE Indexes dept no CHAR(4) dept name VARCHAR(40) Indexes

Explanation / Answer

1. select E.emp_no, T.title, S.salary, D.dept_no from enployees E join titkes T E.emp_no=T.emp_no join E.emp_no=S.emp_no join E.emp_no=D.emp_no where S.salary>50000

2. select DM.emp_no , D.dept_name E.hire_date from dept_manager DM join deptartments D on DM.dept_no=D.dept_no oin employees E on DM.emp_no=E.emp_no.

3. SELECT D.dept_no, S.SUM(salary). E.emp_id FROM  employees E join E.emp_no=S.emp_no join D.emp_no=E.emp_no GROUP BY D.dept_no

4. SELECT DM.count(emp_no) from dept_manager DM join dept_manager DM on DM.emp_no=D.emp_no GROUP by d.dept_no

5. select sum(emp_no) from dept_manager

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote