Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 9, Problem 3HOA
Explanation of Solution
SQL Query:
Refer to the “books”, “orders”, “orderitems” and “customers” tables in the JustLee Books
The SQL statement to perform the stated task with traditional approach is as follows:
SELECT DISTINCT c.lastname, c.customer#
FROM books b, orders o, orderitems i, customers c
WHERE c.customer# = o.customer#
AND o.order# = i.order#
AND i.isbn = b.isbn
AND c.state = 'FL'
AND b.category = 'COMPUTER';
The SQL statement to perform the stated task using the JOIN keyword is as follows:
SELECT DISTINCT c...
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Display 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.
Using software.subscriptions table, pull all columns for subscriptions that have been cancelled.
sql question
Write an UPDATE statement that modifies the Customers table. Change the password column to “reset” for every customer in the table.
Knowledge Booster
Similar questions
- Add two columns to the EMPLOYEES table. One column, named EmpDate, contains the date of employment for each employee, and its default value should be the system date. The second column, named EndDate, contains employees date of termination.arrow_forwardAdd a new row in the ORDERS table with the following data: Order# = 1022, Customer# = 2000, and Order date = August 6, 2009. Describe the error raised and what caused the error.arrow_forwardAdd a new row in the ORDERS table with the following data: Order# = 1021, Customer# = 1009, and Order date = July 20, 2009.arrow_forward
- Ensure that the only legal values for the TYPE column in the TRIP table are Biking, Hiking, or Paddling.arrow_forwardAdd a new row in the ORDERS table with the following data: Order# = 1023 and Customer# = 1009. Describe the error raised and what caused the error.arrow_forward- The HR department needs a report to display employee information as shown from the job_history table. The months worked is the number of months from the start date to the end date. Only list those employees whose months worked is an even number. Order by months worked descendingarrow_forward
- Orders Table: OrderID, CustomerID, Order Date, TotalAmount Customers Table: CustomerID,CustomerName. Retrieve the customer name and order date for each order placed by customers who have made more than two orders.arrow_forwardTask 2: Insert into the LARGE_PROPERTY table the office number, address, bedrooms, floors, monthly rent, and owner number from the PROPERTY table whose square footage is greater than 1,500 square feet.arrow_forwardFor every completed or 'open service request for janitorial work', list the condo id, description, and status.arrow_forward
- The Employee table has the following columns: ID - integer, primary key FirstName - variable-length string LastName - variable-length string ManagerID - integer Write a SELECT statement to show a list of all employees' first names and their managers' first names. List only employees that have a manager. Order the results by Employee first name. Use aliases to give the result columns distinctly different names, like "Employee" and "Manager". Hint: Join the Employee table to itself using INNER JOIN.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 by showing order ID 0.arrow_forwardAdd two columns to the EMPLOYEES table. One column, named EmpDate, contains the date of employment for each employee, and its default value should be the system date. The second column, named EndDate, contains employees’ date of terminationarrow_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
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