READ Free Dumps For Oracle- 1z0-001
Question ID 8172 | You want to create a report that gives per department the number of employees and total salary as a percentage of all the departments. Examine the results from the report: DEPARTMENT %EMPLOYEES %SALARY10 21. 4 30. 15 20 35. 71 37. 47 30 42. 86 32. 39 Which select statement produces the report? |
Option A | SELECT deptno "department", (COUNT(*)/count(empno))* 100 "%employees", (SUM(sal)/count(*)) * 100 "%salary" FROM scott.emp GROUP BY deptno; |
Option B | SELECT deptno "department", PCT(empno) "%employees", PCT(sal) "%salary" FROM scott.emp GROUP BY deptno; |
Option C | SELECT a.deptno "department", (a.num_emp/COUNT(*))*100 "%employees", (a.sal_sum/COUNT(*))*100 "%salary". FROM (SELECT deptno,COUNT(*)num_emp,SUM(SAL)sal_sum FROM scott.emp GROUP BY deptno)a; |
Option D | SELECT |
Option E | deptno. "deparment", ROUND(a.num_emp/b.total_count*100,2) "%employee" ROUND(a.sal_sum/b.total_sal*100,2) "%salary" FROM (SELECT deptno,COUNT(*),num_emp, SUM(SAL), sal_sum FROM scott.emp. GROUP BY deptno , a, (SELECT COUNT(*) total_count,SUM(sal) total_sal. FROM scott.emp) b; |
Correct Answer | D |
Question ID 8173 | Evaluate these two SQL Commands 1 SELECT distinct object_type FROM user_objects; 2 SELECT object_type FROM all_objects; How will the results differ? |
Option B | Statement1 will display the distinct types owned by the user. Statement2 will display all the object types in the database. |
Option C | Statement1 will display the distinct object type owned by the user. Statement2 will display the object types the user can access. |
Option D | Statement1 will display the distinct object types that user can access. Statement2 will display all the object types that the user owns. |
Correct Answer | C |