Question: please help with sql query 1) For each project, list the total number of hours worked on that project and the average salary of employees

please help with sql query  please help with sql query 1) For each project, list the
total number of hours worked on that project and the average salary

1) For each project, list the total number of hours worked on that project and the average salary of employees that work on the project. SELECT List the names of employees that do not work on any projects controlled by departments that are located in Houston. SELECT For each department, list the number of employees who work more than 10 hours on projects controlled by that department. SELECT For each department, print the average salary of employees in that department who earn more than $50,000. SELECT One possible database state for the COMPANY relational database schema. EMPLOYEE DERARTMENT \begin{tabular}{|l|c|c|c|} \hline \multicolumn{1}{|c|}{ Dname } & Dnumber & Mgr_8sn & Mgr_start_date \\ \hline Research & 5 & 333446555 & 19880522 \\ \hline Administration & 4 & 987654321 & 19950101 \\ \hline Headquarters & 1 & 888665555 & 19810619 \\ \hline \end{tabular} WORKS ON DEPT_LOCATIONS \begin{tabular}{|c|l|} \hline Dnumber & Dlocation \\ \hline 1 & Houston \\ \hline 4 & Staflord \\ \hline 5 & Bellaire \\ \hline 5 & Sugarland \\ \hline 5 & Houston \\ \hline \end{tabular} \begin{tabular}{|c|c|c||l|l|l|l|} \hline Essn & Pno & Hours \\ \hline 123456789 & 1 & 32.5 \\ \hline 123456789 & 2 & 7.5 \\ \hline 666884444 & 3 & 40.0 \\ \hline 453453463 & 1 & 20.0 \\ \hline 453453453 & 2 & 20.0 \\ \hline 333445555 & 2 & 10.0 \\ \hline \end{tabular} DEPENDENT \begin{tabular}{|c|l|c|c|l|} \hline Esgn & Dependent name & Sex & Bdate & Relationship \\ \hline 333445555 & Alice & F & 19860405 & Daughter \\ \hline 333445555 & Theodore & M & 19831025 & Son \\ \hline 333445555 & Joy & F & 19580503 & Spouse \\ \hline 987654321 & Abner & M & 19420228 & Spouse \\ \hline 123456789 & Michael & M & 19880104 & Son \\ \hline 123456789 & Alice & F & 19881230 & Daughter \\ \hline 123456789 & Elizabeth & F & 19670505 & Spouse \\ \hline \end{tabular}

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!