Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Textbook Question
thumb_up100%
Chapter 1, Problem 1HOA
Which tables and fields would you access to determine which book titles have been purchased by a customer and when the order shipped?
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
What’s the purpose of a column qualifier? When are you required to use one?
Use the following table to answer the questions below:
Table name: Customers
Column Name
Role
Data Type
Length
Constraint
customerID
stores the ID of a customer
Char
5
Primary key
custFName
stores the first name of a customer
Varchar2
35
Cannot be null
custLName
Stores the last name of a customer
Varchar2
35
Cannot be null
custGender
Store the gender of a customer
Char
1
It should be ‘M’ or ‘F’
custDOB
Stores the date of birth of a customer
Date
custIncome
Store the income of a customer
Number
4
Write in SQL a command that creates the table Customers according to the above description (2 marks).
Write in SQL a statement that adds a new column named accountID of type Char(8). This column should be defined as a foreign key that relates the table Customers to the table Account (1.5 marks).
Write in SQL a command that deletes the customers whose date of birth is after 22-Dec-1990 (1.5 Marks).…
Use the following table to answer the question below:
Table name: Customers
Column Name
Role
Data Type
Length
Constraint
customerID
stores the ID of a customer
Char
5
Primary key
custFName
stores the first name of a customer
Varchar2
35
Cannot be null
custLName
Stores the last name of a customer
Varchar2
35
Cannot be null
custGender
Store the gender of a customer
Char
1
It should be ‘M’ or ‘F’
custDOB
Stores the date of birth of a customer
Date
custIncome
Store the income of a customer
Number
4
Write a SQL query that displays the number of customers who born on the 16th day of a month .
Write in SQL a query that displays the ids of the customers who have the highest income .
Create a view named ‘customerDetails’ to hold all the details of customers whose first names start with ‘S’ and their incomes are between 500 and 1000 Omani Rials .
Chapter 1 Solutions
Oracle 12c: SQL
Ch. 1 - Prob. 1RQCh. 1 - Prob. 2RQCh. 1 - Prob. 3RQCh. 1 - Prob. 4RQCh. 1 - Discuss the problems that can be caused by data...Ch. 1 - Explain the role of a primary key.Ch. 1 - Prob. 7RQCh. 1 - Prob. 8RQCh. 1 - What type of relationship can’t be stored in a...Ch. 1 - Identify at least three reasons an organization...
Ch. 1 - Prob. 1MCCh. 1 - Prob. 2MCCh. 1 - Prob. 3MCCh. 1 - Prob. 4MCCh. 1 - Prob. 5MCCh. 1 - Prob. 6MCCh. 1 - Prob. 7MCCh. 1 - Which of the following has no partial or...Ch. 1 - Prob. 9MCCh. 1 - Which of the following has no partial dependencies...Ch. 1 - Which of the following has no repeating groups but...Ch. 1 - Prob. 12MCCh. 1 - Prob. 13MCCh. 1 - A unique identifier for a data row that consists...Ch. 1 - Which of the following symbols represents an...Ch. 1 - Prob. 16MCCh. 1 - Which of the following represents a field in a...Ch. 1 - Which of the following defines a relationship in...Ch. 1 - When part of the data in a table depends on a...Ch. 1 - Which of the following is used to join data...Ch. 1 - Which tables and fields would you access to...Ch. 1 - Prob. 2HOACh. 1 - Prob. 3HOACh. 1 - Prob. 4HOACh. 1 - Access path A database table is composed of...Ch. 1 - Prob. 6HOACh. 1 - Prob. 7HOACh. 1 - Prob. 8HOACh. 1 - Prob. 9HOACh. 1 - Prob. 10HOA
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
- How do you indicate that a column alias should be used?arrow_forwardUse the following table to answer the questions below: Table name: Customers Column Name Role Data Type Length Constraint customerID stores the ID of a Char 5 Primary key customer custFName stores the first name of a Varchar2 35 Cannot be null customer custLName Stores the last name of a Varchar2 35 Cannot be null customer custGender Store the gender of a Char 1 It should be M customer or 'F' custDOB Stores the date of birth of Date a customer custIncome Store the income of a Number customer a. Write in SQL a command that creates the table Customers according to the above description b. Write in SQL a statement that adds a new column named accountID of type Char(8). This column should be defined as a foreign key that relates the table Customers to the table Account c. Write in SQL a command that deletes the customers whose date of birth is after 22-Dec-1990 d. Write a SQL query that displays the number of customers who born on the 16th day of a month e. Write in SQL a query that…arrow_forwardWhy are subqueries used?arrow_forward
- Use the following table to answer the questions below: Table name: Customers Column Name Role Data Type Length Constraint customerID stores the ID of a Char 5 Primary key customer custFName stores the first name of a Varchar2 35 Cannot be null customer custLName Stores the last name of a Varchar2 35 Cannot be null customer custGender Store the gender of a Char 1 It should be M customer or 'F' custDOB Stores the date of birth of Date a customer custIncome Store the income of a Number customer d. Write a SQL query that displays the number of customers who born on the 16th day of a month e. Write in SQL a query that displays the ids of the customers who have the highest income f. Create a view named 'customerDetails' to hold all the details of customers whose first names start with 'S' and their incomes are between 500 and 1000 Omani Rialsarrow_forwardDisplay the customer ID, name, and order ID for all customer orders. For those customers who do not have any orders, include them in the display once by showing order ID 0.arrow_forwardDisplay in product ID order the product ID and total amount ordered of that product by the customer who has bought the most of that product; use a derived table in a FROM clause to answer this query.arrow_forward
- 9. Find the total amount of tax paid by resident of NJ Hint: The tax cost stored in tax_amount column in the orders table The state name stored in state column in the addresses tablearrow_forwardA query may use any one of six LINQ operators.arrow_forwardDisplay the customer ID, name, and order ID for all customer orders. For those customers who do not have any orders, include them in the display once.arrow_forward
- I. Retrieve the SSN_NUMBER of all employees whose name starts with N. Attribute First Name Last Name SSN Number Data Type Varchar(15) Varchar(15) Char(9) Not Null Not Null Constraint Primary Keyarrow_forwardAn "Orders" table has 30 columns, and the report only needs the order total by date. Which transformation should you perform?arrow_forwardSQL Write a query that displays the VendorID, Vendor Name and Total Invoice for each Vendor in California. Please note that you must use multiple tablesarrow_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