Iv\'e already done #\'s 1,2,3,5. Answer numbers 4,6,7. Write the SQL. I\'ll type
ID: 666754 • Letter: I
Question
Iv'e already done #'s 1,2,3,5. Answer numbers 4,6,7. Write the SQL. I'll type it into my omega account. Any questions, just comment.
1. Display all data from the Employee table. 2. Display last names and first names of all male employees. 3. Display last names, first names, and salaries of all employees sorted in descending order by salary 4. Display department number (DNO), employee count, and total salaries for all departments. This query will display one row for each department. 5. Display last names, first names and department names for all employees. 6. Display project name, employee last name, number of hours worked sorted by project name in ascending order and employee last name in descending order. Display employee last name and supervisor's last name for all employees. Use appropriate column headings in your result. (Supervisor's SSN is available in SUPERSSN column of Employee table) 7.Explanation / Answer
Here I give 4 6 7 answers
4}
Select DNo count(*), sum(sal) from Department group by DNO;
The above query works when all the columns are availabe in the same tableonly other wise access the table.column name in the place of column
6)
Select Pname,last_name from Project no_hours from Works_on where Project.Eid=Workss_on.EID ordered by Pname ASC last_name DSC;
Here EID is employee id which common to both tables
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.