Write a query to display the department name, location name, number of employees, and the average salary for all employees in that department.Label the columns dname, loc, Number of People, and Salary, respectively.Round the average salary to two decimal places. Match on deptno between the EMP and DEPT tables.
SELECT department_name as dname, location_name as loc, sum(employees) as number_of_employees, average(salary) as salary FROM Emp, Dept WHERE Emp.deptno=Dept.deptno GROUP BY department_name;
Select d.dname as Department_Name, d.loc as Location_Name, (select count(e.employee_id) from EMP e JOIN DEPT d ON e.deptno=d.deptno where e.deptno=d.deptno) as Number_of_People, (select round(avg(e.salary),2) from EMP e JOIN DEPT d ON e.deptno=d.deptno where e.deptno=d.deptno) as Average_Salary from EMP e, DEPT d where e.deptno=d.deptno group by d.dname
Select a.employeename ||' earns '||a.salary||' monthly but wants '||a.salary*3 as DreamSalaries from employeeTable a
Select a.LastName, a.hireDate, to_char(a.hiredate,'DAY') from employeeTable a order by to_char(a.hiredate,'D')
Select a.departmentname as dname, a.locationname as loc, count(*) as numberofpeople, round(avg(b.salary),2) Salary from dept a, emp b where a.deptno=b.deptno group by a.departmentname
Homeland Security revokes temporary status for 532,000 Cubans, Haitians, Nicaraguans and Venezuelans
Embassy of Nepal might be able to help extend TPS for Nepal
TPS for Venezuela is terminated, only 60 days extension for transition period
महँगो अण्डाको पिकल्प : कुखुरा र खोर भाडामा लिने
ICE kidnapping people off the streets over op eds
Democrat lies revealed
रबि लामिछानेको दाहिने हात ICE को हिरासतमा
Trump admin revokes 18 months TPS extension for Venezuelans
नेपालको TPS र USAID यसकारण बन्द हुन जरुरि छ
US citizen Petitioning my wife who was out of status when she was in H1B. What to do ?
What is the purpose of an F1 student visa in the U.S.?
Why some Nepali people pull each other's legs???
TPS
#MAGA#FAFO is delicious
Good News for Nepalese TPS Holders!!!
NOTE: The opinions
here represent the opinions of the individual posters, and not of Sajha.com.
It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address
if you want any posting to be considered for deletion. Your request will be
handled on a one to one basis. Sajha.com is a service please don't abuse it.
- Thanks.