Modern Database Management
Modern Database Management
13th Edition
ISBN: 9780134792293
Author: Hoffer
Publisher: PEARSON
bartleby

Concept explainers

Question
Book Icon
Chapter 6, Problem 6.57PAE
Program Plan Intro

SQL query (for every received order) to display orderID, total payable amount of the order, and the amount of payment received with respect to the order. Display the results in the decreasing order of the difference between the total due and the amount paid.

Blurred answer
Students have asked these similar questions
Create an UPDATE query that lowers the daily rental rate of sailboat rentals by 10%.  Note: show me select * from boat showing contents of boat table after you run this update.  I should have the before from the beginning of the assignment. Search for boats for rent under $200 per day, show Boat Unique Identifier, Boat Type, Boat Length, Price per Day to rent the boat and Location (where boat is parked for pickup (please include name of marina, not just the PrimaryKey).   Create a query that shows the rentals that had different pickup and different drop off location, show Boat Unique identifier, Renter unique identifier, Start Date, End Date, Pickup Location and Drop Off Location and drop off fee of the Marina Drop Off Location(please include name of marina, not just the PrimaryKey).  From Renter and Rental table:create a query that shows Renter unique identifier, Renter name, boat unique identifier, boat name, startdate, enddate of a rental and number of days rented (name column…
SQL: For every invoice, display the invoice number, invoice date and the total dollar amount for all products purchased in the invoice, ordered by invoice number in descending order and then by invoice date in ascending order. Here you will use an aggregate SUM(x,y) function in your SELECT clause to calculate the total dollar amount (a calculated field – name it TOTAL). Don’t forget to join on the tables as well. [hint: you should have 8 rows of output ordered properly]. My code is as follows: select inv_number, inv_date, sum(line_price) as 'total' from invoice, line where invoice.inv_number = line.inv_number order by inv_number desc, inv_date asc ;  I am getting this error: ORA-00923: FROM keyword not found where expected Any recommendations on what I am doing wrong?
SQL: For every invoice, display the invoice number, invoice date and the total dollar amount for all products purchased in the invoice, ordered by invoice number in descending order and then by invoice date in ascending order. Here you will use an aggregate SUM(x,y) function in your SELECT clause to calculate the total dollar amount (a calculated field – name it TOTAL). Don’t forget to join on the tables as well. [hint: you should have 8 rows of output ordered properly].   select inv_number, inv_date sum(list_price) as 'total' from invoice, line order by desc inv_num, asc inv_date. I am getting the error: ORA-00923: FROM keyword not found where expected   Am I formulating the query incorrectly?

Chapter 6 Solutions

Modern Database Management

Ch. 6 - Describe a set of circumstances for which using a...Ch. 6 - Prob. 6.12RQCh. 6 - Prob. 6.13RQCh. 6 - Prob. 6.14RQCh. 6 - Prob. 6.15RQCh. 6 - Prob. 6.16RQCh. 6 - Prob. 6.17RQCh. 6 - Prob. 6.18RQCh. 6 - Prob. 6.19RQCh. 6 - List for advantages of SQL-invoked routines.Ch. 6 - Prob. 6.21RQCh. 6 - Prob. 6.22RQCh. 6 - Prob. 6.23RQCh. 6 - This chapter discusses the data dictionary views...Ch. 6 - Write an SQL query to answer the following...Ch. 6 - Write SQL retrieval commands for each of the...Ch. 6 - Write an SQL query to answer the following...Ch. 6 - Write SQL queries to answer the following...Ch. 6 - Write SQL queries to answer the following...Ch. 6 - Write an SQL query to answer the following...Ch. 6 - Prob. 6.31PAECh. 6 - Prob. 6.32PAECh. 6 - Prob. 6.33PAECh. 6 - What do you need to do if a tutor signs up and...Ch. 6 - Prob. 6.35PAECh. 6 - Write the SQL query to find any tutors who have...Ch. 6 - Prob. 6.37PAECh. 6 - Write an SQL query to determine the total number...Ch. 6 - Prob. 6.39PAECh. 6 - Prob. 6.40PAECh. 6 - Prob. 6.41PAECh. 6 - Prob. 6.42PAECh. 6 - Prob. 6.43PAECh. 6 - Which tutor needs to be reminded to tum in...Ch. 6 - Prob. 6.45PAECh. 6 - Write an SQL query to list all product line names...Ch. 6 - Modify to include only those product lines the...Ch. 6 - Prob. 6.48PAECh. 6 - Prob. 6.49PAECh. 6 - Write an SQL query to display the order number,...Ch. 6 - Prob. 6.51PAECh. 6 - Prob. 6.52PAECh. 6 - Prob. 6.53PAECh. 6 - Prob. 6.54PAECh. 6 - Prob. 6.55PAECh. 6 - Prob. 6.56PAECh. 6 - Prob. 6.57PAECh. 6 - Prob. 6.58PAECh. 6 - Write an SQL query to list each customer who...Ch. 6 - Prob. 6.60PAECh. 6 - Modify Problem and Exercise 6-60 so that the list...Ch. 6 - Prob. 6.62PAECh. 6 - Prob. 6.63PAECh. 6 - Prob. 6.64PAECh. 6 - Prob. 6.65PAECh. 6 - Prob. 6.66PAECh. 6 - Prob. 6.67PAECh. 6 - Prob. 6.68PAECh. 6 - Prob. 6.69PAECh. 6 - Prob. 6.70PAECh. 6 - Prob. 6.71PAECh. 6 - Rewrite your answer to Problem and Exercise 6-71...Ch. 6 - Display the customer ID, name, and order ID for...Ch. 6 - Prob. 6.74PAECh. 6 - Prob. 6.75PAECh. 6 - Prob. 6.76PAECh. 6 - Prob. 6.77PAECh. 6 - Prob. 6.78PAECh. 6 - Prob. 6.79PAECh. 6 - Write an SQL query to list the order number,...Ch. 6 - Prob. 6.81PAECh. 6 - Prob. 6.82PAECh. 6 - Prob. 6.83PAECh. 6 - Prob. 6.84PAECh. 6 - Prob. 6.85PAE
Knowledge Booster
Background pattern image
Computer Science
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
Recommended textbooks for you
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage