READ Free Dumps For Oracle- 1z0-007
Question ID 7999 | You need to write a SQL statement that returns employee name, salary, department ID, and maximum salary earned in the department of the employee for all employees who earn less than the maximum salary in their department. Which statement accomplishes this task? |
Option A | SELECT a.emp_name, a.sal, b.dept_id, MAX(sal) FROM employees a, departments b WHERE a.dept_id = |
Option B | dept_id AND a.sal<MAX(sal) GROUP BY b.dept_id; |
Option C | SELECT a.emp_name, a.sal, a.dept_id, b.maxsal FROM employees a, (SELECT dept_id, MAX(sal) maxsal FROM employees GROUP BY dept_ id ) b WHERE a.dept_id =b.dept_id AND a.sal < b.maxsal; |
Option D | SELECT a.emp_name, a.sal, a.dept_id, b.maxsal FROM employees a WHERE a.sal < (SELECT MAX(sal) maxsal FROM employees b GROUP BY dept_id; |
Option E | SELECT emp_name, sal, dept_id, maxsal FROM employees, (SELECT dept_id, MAX(sal) maxsal FROM employees GROUP BY dept_id) WHERE a.sal < maxsal; |
Correct Answer | B |
Question ID 8000 | The CUSTOMERS table has these columns: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) A promotional sale is being advertised to the customers in France. Which WHERE clause identifies customers that are located in France? |
Option A | WHERE lower(country_address) = "france" |
Option B | WHERE lower(country_address) = 'france' |
Option C | WHERE lower(country_address) IS 'france' |
Option D | WHERE lower(country_address) = '%france%' |
Option E | WHERE lower(country_address) LIKE %france% |
Correct Answer | B |