Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
error_outline
This textbook solution is under construction.
Students have asked these similar questions
Which of the following relational set operator allows duplicate values in a table?
Choose an answer
A
Union ALL
B
Update
C
Except
D
Union
Which query determines the customers who have ordered the most books from JustLee Books? (refer to the tables in the JustLee Books database.)a. SELECT customer# FROM ordersJOIN orderitems USING(order#)HAVING SUM(quantity) = (SELECTMAX(SUM(quantity)) FROM ordersJOIN orderitems USING(order#)GROUP BY customer#) GROUP BY customer#;b. SELECT customer# FROM ordersJOIN orderitems USING(order#)WHERE SUM(quantity) = (SELECTMAX(SUM(quantity)) FROM orderitemsGROUP BY customer#);c. SELECT customer# FROM ordersWHERE MAX(SUM(quantity)) = (SELECTMAX(SUM(quantity) FROM orderitemsGROUP BY order#);d. SELECT customer# FROM ordersHAVING quantity = (SELECT MAX(SUM(quantity))FROM orderitemsGROUP BY customer#);
Which one of the following SQL select statements will display a list of all vendors that do not yet have names entered in the vendor table?
Question 8 options:
1)
select vend_code, vend_name from vendor where vend_name IS NULL;
2)
select vend_code, vend_name from vendor where vend_name IS NOT NULL;
3)
select vend_code, vend_name from vendor where vend_name = NULL;
4)
select vend_code, vend_name from vendor where vend_name = NOT NULL;
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Which of the following SELECT statements displays a list of customer names from the CUSTOMERS table? SELECT customer names FROM customers; SELECT “Names” FROM customers; SELECT firstname, lastname FROM customers; SELECT firstname, lastname, FROM customers; SELECT firstname, lastname, “Customer Names” FROM customers;arrow_forwardWhich of the following characters can be used in a table name? a. b. ( c. % d. !arrow_forwardWhich of the following queries identifies other customers who were referred to JustLee Books by the same person who referred Jorge Perez?a. SELECT customer# FROM customersWHERE referred = (SELECT referred FROM customersWHERE firstname = 'JORGE'AND lastname = 'PEREZ');b. SELECT referred FROM customersWHERE (customer#, referred) = (SELECT customer#FROM customers WHERE firstname = 'JORGE'AND lastname = 'PEREZ');c. SELECT referred FROM customersWHERE (customer#, referred) IN (SELECT customer#FROM customers WHERE firstname = 'JORGE'AND lastname = 'PEREZ');d. SELECT customer# FROM customersWHERE customer# = (SELECT customer#FROM customers WHERE firstname = 'JORGE'AND lastname = 'PEREZ');arrow_forward
- Which of the following queries is used to list a unique value for V_CODE, where the list will produce only a list of those values that are different from one another? SELECT ONLY V_CODE FROM PRODUCT; SELECT UNIQUE V_CODE FROM PRODUCT; SELECT DIFFERENT V_CODE FROM PRODUCT; SELECT DISTINCT V_CODE FROM PRODUCT;arrow_forwardWhich of the following SQL statements displays a customer’s name in all uppercase characters? (refer to the tables in the JustLee Books database.)a. SELECT UPPER('firstname', 'lastname')FROM customers;b. SELECT UPPER(firstname, lastname)FROM customers;c. SELECT UPPER(lastname, ',' firstname)FROM customers;d. none of the abovearrow_forwardWhich of the following statements is valid? (refer to the tables in the JustLee Books database.)a. SELECT title FROM booksWHERE retail<(SELECT cost FROM booksWHERE isbn = '9959789321');b. SELECT title FROM booksWHERE retail = (SELECT cost FROM booksWHERE isbn = '9959789321' ORDER BY cost);c. SELECT title FROM booksWHERE category IN (SELECT cost FROM orderitemsWHERE isbn = '9959789321');d. none of the above statementsarrow_forward
- Which of the following SELECT statements lists the highest retail price of all books in the Family category? (refer to the tables in the JustLee Books database.)a. SELECT MAX(retail)FROM booksWHERE category = 'FAMILY';b. SELECT MAX(retail)FROM booksHAVING category = 'FAMILY';c. SELECT retailFROM booksWHERE category = 'FAMILY'HAVING MAX(retail);d. none of the abovearrow_forwardWhich of the following SELECT statements returns 30 as the result? (refer to the tables in the JustLee Books database.)a. SELECT ROUND(24.37, 2) FROM dual;b. SELECT TRUNC(29.99, 2) FROM dual;c. SELECT ROUND(29.01, -1) FROM dual;d. SELECT TRUNC(29.99, -1) FROM dual;arrow_forwardWhich of the following displays the order date for order 1000 as 03/31? (refer to the tables in the JustLee Books database.)a. SELECT TO_CHAR(orderdate, 'MM/DD')FROM ordersWHERE order# ¼ 1000;b. SELECT TO_CHAR(orderdate, 'Mth/DD')FROM ordersWHERE order# ¼ 1000;c. SELECT TO_CHAR(orderdate, 'MONTH/YY')FROM ordersWHERE order# ¼ 1000;d. both a and be. none of the abovearrow_forward
- Some rows of a User table are shown below: User ucode name phone scode 7 Alex 847 - 3902 UX 8 Tony 203 - 3902 PX 9 Charles BD 11 Mary 877 - 3333 BD Which of the following queries retrieves the rows where there is no phone? a. SELECT * FROM User WHERE phone IS NULL b. SELECT * FROM User WHERE phone = “ ” c. SELECT * FROM User WHERE phone NOT IS NULL d. SELECT * FROM User WHERE phone > 0arrow_forwardWhich query identifies customers living in the same state as the customer namedLeila Smith?a. SELECT customer# FROM customersWHERE state = (SELECT state FROM customersWHERE lastname = 'SMITH');b. SELECT customer# FROM customersWHERE state = (SELECT state FROM customersWHERE lastname = 'SMITH'OR firstname = 'LEILA');c. SELECT customer# FROM customersWHERE state = (SELECT state FROM customersWHERE lastname = 'SMITH'AND firstname = 'LEILA'ORDER BY customer);d. SELECT customer# FROM customersWHERE state = (SELECT state FROM customersWHERE lastname = 'SMITH'AND firstname = 'LEILA');arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you