单选题 View the Exhibit and examine the structure of the ORDER_ITEMS table.Examine the following SQL statement:SELECT order_id, product_id, unit_price FROM order_itemsWHERE unit_price = (SELECT MAX(unit_price) FROM order_items GROUP BY order_id);You want to display the PRODUCT_ID of the product that has the highest UNIT_PRICE per ORDER_ID) What Answer: ion should be made in the above SQL statement to achieve this?

A、 Remove the GROUP BY clause from the subquery and place it in the main query
B、 Replace = with the >ANY operator
C、 Replace = with the >ALL operator
D、 Replace = with the IN operator
下载APP答题
由4l***w5提供 分享 举报 纠错

相关试题

单选题 Examine the description of the EMPLOYEES table:Nane Null Type----------------------------------------------------------EMP_ID NOT NUL NUMBEREMP_NAME VARCHAR2 (40)DEPT_ID NUMBER(2)SALARY NUMBER(8,2)JOIN_DATE DATEWhich query is valid?

A、 SELECT dept_id, join_date, SUM (salary) FROM employees GROUP BY dept_id, join_date;
B、 SELECT dept_id, join_date, SUM (salary) FROM employees GROUP BY dept_id;
C、 SELECT dept_id, MAX (AVG (Salary)) FROM employees GROUP BY dept_id;
D、 SELECT dept_id, AVG (MAX (salary)) FROM employees GROUP BY dept_id;

单选题 Examine this query:SELECT 2 FROM dual d1 CROSS JOIN dual d2 CROSS JOIN dual d3; What is returned upon execution?

A、 0 rows
B、 an error
C、 8 rows
D、 6 rows
E、 1 rows
F、 3 rows

单选题 The EMPLOYEES table contains columns EMP_ID of data type NUMBER and HIRE_DATE OF DATA TYPE DATE.You want to display the date of the first Monday after the completion of six months since hiring.The NLS_TERRITORY parameter is set to AMERICA in the session and, therefore, Sunday is the first day of the week.Which query can be used?

A、 SELECT EMP_ID, NEXT_DAY (ADD_MONTHS (HIRE_DATE, 6),'MONDAY') FROM EMPLOYEES
B、 SELECT EMP_ID, ADD_MONTHS (HIRE_DATE, 6) NEXT_DAY ('MONDAY') FROM EMPLOYEES
C、 SELECT EMP_ID, NEXT_DAY (MONTHS_BETWEEN (HIRE_DATE, SYSDATE), 6) FROM EMPLOYEES
D、 SELECT EMP_ID, NEXT_DAY(ADD_MONTHS (HIRE_DATE, 6), 1) FROM EMPLOYEES

单选题 Examine the description of the PRODUCT_INFORMATION table: NAME NULL? Type----------------------- ------------------- ------------------------ PROD_ID NOT NULL NUMBER (2) PROD_NAME VARCHAR2 (10)LIST_PRICE NUMBER (6, 2)Which query retrieves the number of products with a null list price?

A、 SELECT COUNT (list_price) FROM product_information WHERE list_price = NULL;
B、 SELECT COUNT (NVL (list_price, 0) ) FROM product_information WHERE list_price IS NULL;
C、 SELECT COUNT (DISTINCT list_price) FROM product_information WHERE list_price IS NULL;
D、 SELECT COUNT (list_price) FROM product_information WHERE list_price IS NULL;

单选题 Examine the description of the SALES1 table: SALES2 is a table with the same description as SALES1. Some sales data is duplicated in both tables.You want to display the rows from the SALES1 which are not present in the SALES2 table: Which set operator generates the required output?

A、 UNION ALL
B、 MINUS
C、 INTERSECT
D、 SUBTRACT
E、 UNION

单选题 Examine this query:SELECT TRUNC (ROUND (156.00,-2),-1) FROM DUAL;What is the result?

A、 16
B、 160
C、 150
D、 200
E、 100

单选题 Examine the description of the CUSTMERS table:You want to display details of all customers who reside in cities starting with the letter D followed by at least two characters.Which query can be used?

A、 SELECT * FROM customers WHERE city ='D_%';
B、 SELECT * FROM customers WHERE city = '%D_';
C、 SELECT * FROM customers WHERE city like 'D_%';
D、 SELECT * FROM customers WHERE city like 'D_';

单选题 Examine the description of the EMPLOYEES table: NLS_DATE_FORMAT is set to DD-MON-YY.Which query requires explicit data type conversion?

A、 SELECT salary + '120.50' FROM employees;
B、 SELECT SUBSTR (join_date, 1, 2) - 10 FROM employees;
C、 SELECT join_date 11.'11 salary FROM employees;
D、 SELECT join_date FROM employees WHERE join_date > *10-02-2018*;
E、 SELECT join_date + 20 FROM employees;