Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 2, Problem 3MC
Which of the following is not a valid SELECT statement?
- a. SELECT lastname, firstname FROM customers;
- b. SELECT * FROM orders;
- c. Select FirstName NAME from CUSTOMERS;
- d. SELECT lastname Last Name FROM customers;
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
53. Which SELECT statement retrieves the customer name for those that have a salesperson number of 137?
A: SELECT CUSTNAME
FROM CUSTOMER
WHERE SPNUM 137;
B: SELECT*
FROM CUSTNAME
WHERE SPNUM=137;
C: SELECT CUSTOMER
FROM CUSTNAME
WHERE SPNUM=137;
D:SELECT*
FROM CUSTOMER
WHERE SPNUM=137
The following statement uses a non-correlated subquery to find the South American country with the smallest population:
SELECT * FROM Country
WHERE Continent = 'South America' AND Population = (SELECT MIN(Population)
FROM Country WHERE Continent = 'South America')\G
Rewrite the statement to use a correlated subquery.
the employee table have the following .
ask user what is the employee_id and how much employee wants to contribute
2 substitutions variable from end user &emp_id &contribution_amount
If employee salary is in between $1000-$3999 And if employee's contribution amount is less than $100 then company match $100 if employee's contribution amount is greater than 100 but less than $200 then company match $75 if employee's contribution amount is greater than $200 then company match $50
$4000-$6999 And if employee's contribution amount is less than $100 then company match $150 if employee's contribution amount is greater than 100 but less than $200 then company match $100 if employee's contribution amount is greater than $200 then company match $75
$7000-$12000And if employee's contribution amount is less than $100 then company match $200 if employee's contribution amount is greater than…
Chapter 2 Solutions
Oracle 12c: SQL
Ch. 2 - Prob. 1RQCh. 2 - What are the two required clauses for a SELECT...Ch. 2 - What is the purpose of the SELECT statement?
Ch. 2 - What does an asterisk () in the SELECT clause of a...Ch. 2 - What is the purpose of a column alias?Ch. 2 - How do you indicate that a column alias should be...Ch. 2 - When is it appropriate to use a column alias?
Ch. 2 - What are the guidelines to keep in mind when using...Ch. 2 - Prob. 9RQCh. 2 - What is a NULL value?
Ch. 2 - Which of the following SELECT statements displays...Ch. 2 - Which clause is required in a SELECT...Ch. 2 - Which of the following is not a valid SELECT...Ch. 2 - Which of the following symbols represents...Ch. 2 - Prob. 5MCCh. 2 - Prob. 6MCCh. 2 - Which of the following is a valid SELECT...Ch. 2 - Which of the following symbols is used in a SELECT...Ch. 2 - Prob. 9MCCh. 2 - When must a comma be used in the SELECT clause of...Ch. 2 - Prob. 11MCCh. 2 - Which clause is not required in a SELECT...Ch. 2 - Which of the following lines of the SELECT...Ch. 2 - Which of the following lines of the SELECT...Ch. 2 - Which of the following lines of the SELECT...Ch. 2 - Which of the following lines of the SELECT...Ch. 2 - Which of the following lines of the SELECT...Ch. 2 - Which of the following lines of the SELECT...Ch. 2 - Which of the following lines of the SELECT...Ch. 2 - Which of the following lines of the SELECT...Ch. 2 - Prob. 1HOACh. 2 - Prob. 2HOACh. 2 - Prob. 3HOACh. 2 - Prob. 4HOACh. 2 - Prob. 5HOACh. 2 - Prob. 6HOACh. 2 - Prob. 7HOACh. 2 - Create a list of each book title stored in the...Ch. 2 - Prob. 9HOACh. 2 - List all information for each order item. Include...
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
- 31 Refer to the given SQL statement. SELECT PRODNUM, PRODNAME FROM PRODUCT: Which line designates a product number of at least 300 when added to the end of this statement? O WHERE PRODNUM>=300 WHERE PRODNUM=300+ O WHERE PRODNUM=(300; unlimited) WHERE PRODNUM=>300arrow_forward2arrow_forwardWrite a SELECT statement that uses a correlated subquery to return one row per customer, representing the customer's oldest order (the one with the earliest date). Each row should include these five columns: first_name last_name order_id order_date total quantity Include only orders with a total order quantity greater than 2. Subject: MySQLarrow_forward
- Determine the amount of total profit generated by the book purchased on order 1002. Display the book title and profit. The profit should be formatted to display a dollar sign and two decimal places. Take into account that the customer might not pay the full retail price, and each item ordered can involve multiple copies. SELECT title, TO_CHAR(quantity-(paideach-cost), '$999.99') FROM books JOIN orderitems USING (isbn) WHERE order# = 1002; SELECT title, TO_CHAR(quantity*(paideach-cost), '$999.99') FROM books JOIN orderitems USING (isbn) SELECT title, TO_CHAR(quantity*(paideach-cost), '$999.99') FROM books JOIN orderitems USING (isbn) WHERE order# = 1002; SELECT title, TO_CHAR(quantity*(paideach-cost), '$999.99') FROM books JOIN orderitems USING (isbn) WHERE order# IN ( 1002,1003,1004)arrow_forwardThe Book table has the following columns: ID Title Author Genre Year Price Complete the SELECT statement to select the genre and the total number of books for that genre. SELECT /* Type your code here */ FROM Book GROUP BY Pick ✓arrow_forwardWhich of the following sql statements contains an error? I) Select * from employee; II) Select * from employee where employeeid = 165; III) Select employeeid where employeeid = 108 and lastname = NAIK'; III II, III O Nonearrow_forward
- When you don’t know the specific value to include in the criteria, you use a ____. a. limited query b. unfilled query c. tagged query d. parameter queryarrow_forwardWrite a Select statement that returns the Trading_Symbol column and the Num_Shares column only from the rows where Selling_Price is greater than Purchase_Price and Num_Shares is greater than 100. The results should be sorted bythe Num_Shares column in ascending order.arrow_forwardWrite a SELECT statement that uses the ranking functions to rank products by the total quantity sold. Return these columns: The product_name column from the Products table A column named total_quantity that shows the sum of the quantity for each product in the Order_Items table A column named rank that uses the RANK function to rank the total quantity in descending sequence A column named dense_rank that uses the DENSE_RANK function to rank the total quantity in descending sequencearrow_forward
- Use select statements to create queries that answer the following questions. Only provide the information requested. Do not provide the output. All tables are provided below List the name of all bouquets that are priced at $29.99. List the customer id for all customers who ordered item 7.arrow_forwardThe Book table has the following columns: ID Title Author Genre Year Price Complete the SELECT statement to select the year and the average price of books for that year. SELECT *Type your code here */ FROM Book GROUP BY Pickarrow_forwardWrite a ASQ statement to return to see all of the first names in the People table. SELECT first name FROM people; WHERE FROM People first name; FROM People SELECT first_name; First name WHERE FROM People;arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
How to Design DB Tables for any Application? (The Basics); Author: Studytonight;https://www.youtube.com/watch?v=XUdNVaSikqY;License: Standard YouTube License, CC-BY
Create a Table (Introduction to Oracle SQL); Author: Database Star;https://www.youtube.com/watch?v=BiV1IrzB1sY;License: Standard Youtube License