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 15MC
Which of the following lines of the SELECT statement contains an error?
1 SELECT title, cost,
2 cost*2
3 'With 200% Markup'
4 FROM books;
- a. line 1
- b. line 2
- c. line 3
- d. line 4
- e. There are no errors.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Write a SELECT statement returns these columns from the orders table:
The invoice_id column as Invoice_ID
The invoice_date column as Invoice_Date
The invoice_due_date column as Invoice_Due_Date
The payment_date column in the format 'Mon/DD/YY' as Formatted_Payment_Date
The invoice_due_date column in the format 'Weekday, Month Day of month with suffix, YYYY' (ex: 'Tuesday, April 23rd, 2019') as Long_Invoice_Due_Date
The invoice_due_date plus 60 days as Expected_Payment_Date (Column must remain a date type)
The number of days between the invoice_due_date and the payment_date as Time_To_Pay
Write 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 sequence
What are the three primary elements of the SELECT statement.
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
- Which of the following lines of the SELECT statement contains an error? 1 SELECT * 2 FROM publishers; line 1 line 2 There are no errors.arrow_forwardWhich of the following lines of the SELECT statement contains an error? 1 SELECT ISBN, 2 retail-cost 3 FROM books; a. line 1 b. line 2 c. line 3 d. There are no errors.arrow_forwardWhich of the following lines of the SELECT statement contains an error? 1 SELECT title, category 2 FORM books; line 1 line 2 There are no errors.arrow_forward
- Which of the following lines of the SELECT statement contains an error? 1 SELECT ISBN, || 'is the ISBN for the book named' || 2 title 3 FROM books; line 1 line 2 line 3 There are no errors.arrow_forwardWEEK 9 ASSIGNMENT#6 Part II: Complete the following exercise: Using a subquery, select student first name where the student is in the student course table. Using a subquery, select the course id where the average GPA is 2. Using a subquery, select the course id where the average GPA is greater than 2. Using a subquery, select student first name where the student is not in the student course tarrow_forwardWrite a SELECT statement that returns the following columns from the PRODUCT_INFORMATION table. Sort the results by PRODUCT_ID in ascending order. 1. PRODUCT_ID 2. PRODUCT_NAME 3. LIST_PRICE ○ Use the TO_CHAR function to convert LIST_PRICE to a character string with the currency formatting Give this field an alias of PRICEarrow_forward
- Which clause of a SQL Select statement is required if we want to display aggregate data by category such as total population by state, department, etc.? Question 40 options: 1) GROUP BY 2) ORDER BY 3) WHERE 4) FROM 5) SELECTarrow_forward31 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_forwardWhich of the following SELECT statements will select the ProdNum field from the Products table, and then sort the records in descending order by the Price field? a. SELECT ProdNum FROM Products WHERE Price DESC b. SELECT ProdNum FROM Products ORDER BY Price DESC c. SELECT ProdNum FROM Products SORT Price DESC d. SELECT ProdNum FROM Products ORDER BY ProdNum DESCarrow_forward
- Q1. Write a SELECT statement that returns these columns from the Invoices table: The invoice _total column A column that uses the ROUND function to return the invoice_total column with 1 decimal digit A column that uses the ROUND function to return the invoice_total column with no decimal digits Q1. Write a SELECT statement that returns these columns from the Invoices table: • The invoice_total column • A column that uses the ROUND function to return the invoice_total column with 1 decimal digit • A column that uses the ROUND function to return the invoice_total column with no decimal digits invoice_total one digit 3813.33 3813.3 zero_digits 3813arrow_forwardChoose the SELECT statement that returns the given results from the Auto table below. ID Make Model Type Year Price 1 Toyota Camry sedan 2016 9800 2 Ford Escape crossover 2015 15900 3 Honda Civic sedan 2016 10200 4 Volkswagen Golf compact 2014 8800 5 Toyota RAV4 crossover 2016 12800 6 Toyota 4Runner suv 2015 16900 7 Honda CR-V crossover 2016 17900 Result : Honda 2 Toyota 3 Select Make, Count(Make) FROM Auto Group By Make; Select Make, COUNT(Make) From Auto Group By Make Having Count(Make) > 1; Select Make, Count(Make) From Auto Group By Make Having COUNT >1;arrow_forwardDifferentiate between the WHERE, OUTPUT and the ORDER BY clause.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
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