Knowee
Questions
Features
Study Tools

The COMMISSION column shows the monthly commission earned by the employee. Emp_IdDept_IdCommission1105002201000310 410600530800630200710 820300   Which tasks would require sub queries or joins in order to be performed in a single step?Select one or more:a.Finding the number of employees who earn a commission that is higher than the average commission of the company b.Finding the total commission earned by the employees in department 10c.Listing the employees who earn the same amount of commission as employee 3d.Listing the departments whose average commission is more that 600 e.Listing the employees whose annual commission is more than 6000 f.Listing the employees who do not earn commission and who are working for department 20 in descending order of the employee ID

Question

The COMMISSION column shows the monthly commission earned by the employee. Emp_IdDept_IdCommission1105002201000310 410600530800630200710 820300   Which tasks would require sub queries or joins in order to be performed in a single step?Select one or more:a.Finding the number of employees who earn a commission that is higher than the average commission of the company b.Finding the total commission earned by the employees in department 10c.Listing the employees who earn the same amount of commission as employee 3d.Listing the departments whose average commission is more that 600 e.Listing the employees whose annual commission is more than 6000 f.Listing the employees who do not earn commission and who are working for department 20 in descending order of the employee ID

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

The tasks that would require sub queries or joins in order to be performed in a single step are:

a. Finding the number of employees who earn a commission that is higher than the average commission of the company. This would require a subquery to first calculate the average commission of the company and then compare it with each employee's commission.

c. Listing the employees who earn the same amount of commission as employee 3. This would require a subquery to first find the commission of employee 3 and then find the employees who earn the same commission.

d. Listing the departments whose average commission is more than 600. This would require a subquery to first calculate the average commission for each department and then find the departments where this average is more than 600.

e. Listing the employees whose annual commission is more than 6000. This would require a subquery to calculate the annual commission for each employee (assuming the commission is monthly, this would be commission * 12) and then find the employees where this annual commission is more than 6000.

f. Listing the employees who do not earn commission and who are working for department 20 in descending order of the employee ID. This would require a join between the employee and department tables to find the employees who meet these conditions.

This problem has been solved

Similar Questions

Find the following table EmployeeDetails, with the attributes EmployeeID, EmpName, Designation, Salary, DeptNo. You are assigned to a task of providing the solution to the operations department by writing the query which displays the employeeID and the Designation of all the employees whose Salaries are more than the Salary of employees designated as ManagerC

Select the suitable option for displaying the average commission percentage of all employees, where the commission percentage column of certain employees include NULL value.Select one:a.select AVG(NVL(commission_pct)) from emp;b.select AVG(NVL(commission_pct,0)) from emp;c.select AVG(NVL(0,commission_pct)) from emp;d.select AVG(ommission_pct) from emp;

Write queries for the following tables:T1 ( Empno, Ename , Salary, Designation)T2 (Empno, Deptno.)(1) Display the Deptno in which Employee Seeta is working.(2) Display Empno, Ename, Deptno.

1. Write a query to find all employees who earn more than the average salary.2. Write a query to retrieve the names of employees who work in the same department as ‘John’.3. Write a query to display the second highest salary from the Employee table.4. Write a query to find all customers who have made more than five orders.5. Write a query to count the number of orders placed by each customer.6. Write a query to retrieve the list of employees who joined in the last 6 months.7. Write a query to find the total sales amount per product.8. Write a query to list all products that have never been sold.9. Write a query to update the salary of employees based on their performance rating.10. Write a query to delete duplicate rows from a table.11. Write a query to find the second highest salary in a company without using the MAX function twice.12. Write a query to identify the top 10 customers who have not placed an order in the last year.13. Create a query to compute the year-over-year growth rate of revenue for each product category.14. Write a query to join three tables and filter the results to show only records that exist in exactly two of the tables.15. Construct a query to find the median sales amount for each region.16. Write a query to calculate the retention rate of customers over a given time period.17. Write a query to find duplicate records in a table and count the number of duplicates for each unique record.18. Create a query to find employees who have been with the company for more than 5 years but have never been promoted.

Raj, a Database Administrator, needs to display the average pay of workersfrom those departments which have more than five employees. He isexperiencing a problem while running the following query:SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT(*) > 5GROUP BY DEPT;Which of the following is a correct query to perform the given task?i. SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT(*) > 5GROUP BY DEPT;ii. SELECT DEPT, AVG(SAL) FROM EMP HAVING COUNT(*) >5 GROUP BY DEPT;iii. SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPTWHERE COUNT(*) > 5;iv. SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPTHAVING COUNT(*) > 5;

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.