READ Free Dumps For Oracle- 1z0-007
Question ID 7873 | Examine the structure of the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. EMPLOYEES NOT NULL, EMPLOYEE_ID NUMBER Primary Key VARCHAR2 EMP_NAME (30) VARCHAR2 JOB_ID (20) SALARY NUMBER References MGR_ID NUMBER EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table DEPARTMENTS NOT NULL, Primary DEPARTMENT_ID NUMBER Key VARCHAR2 DEPARTMENT_NAME (30) References NGR_ID MGR_ID NUMBER column of the EMPLOYEES table Foreign key to LOCATION_ID NUMBER LOCATION_ID column of the LOCATIONS table LOCATIONS NOT NULL, Primary LOCATION_ID NUMBER Key VARCHAR2 CITY |30) Which two SQL statements produce the name, department name, and the city of all the employees who earn more then 10000? (Choose two) |
Option A | SELECT emp_name, department_name, city FROM employees e JOIN departments d USING (department_id) JOIN locations 1 USING (location_id) WHERE salary > 10000; |
Option B | SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 JOIN ON (e.department_id = d.department id) AND (d.location_id =1.location_id) AND salary > 10000; |
Option C | SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 WHERE salary > 10000; |
Option D | SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 WHERE e.department_id = d.department_id AND d.location_id = 1.location_id AND salary > 10000; |
Option E | SELECT emp_name, department_name, city FROM employees e NATURAL JOIN departments, locations WHERE salary > 10000; |
Correct Answer | AD |
Question ID 7874 | Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only of the minimum salary is less then 5000 and the maximum salary is more than 15000? |
Option A | SELECT dept_id, MIN(salary(, MAX(salary) FROM employees WHERE MIN(salary) 15000; |
Option B | SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id; |
Option C | SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) 15000; |
Option D | SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN (salary) < 5000 AND MAX(salary) |
Option E | SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN (salary) 15000; |
Correct Answer | D |