Modern Database Management (12th Edition)
12th Edition
ISBN: 9780133544619
Author: Jeffrey A. Hoffer, Ramesh Venkataraman, Heikki Topi
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 6, Problem 6.82PAE
Program Plan Intro
SQL query to list total unit sales of products with ID 1, 2, and 7 in single row and three columns labelled as Prod1, Prod2 and Prod7 respectively.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
- 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 descending
Q9) find the least expensive priceQ10) List the UNIQUE v_code of vendors that provide productsQ11) find the most expensive priceQ12) List the number of products by vendor with the average price, include only the rows withaverage price below 10.00Q13) List all vendor rows (including the ones that have no matching products) and all matchingproduct rows
PRODUCTS
PID
DESC
PRICE
SID
QTY
801
Pencil
3
1
10
802
A4
6
2
15
803
Ballpen
4
2
804
Marker
2
3
20
Display the Product ID, Description, and Quantity (QTY) of all the products in the PRODUCTS table whose PID is from 801 to 802 and whose quantity is less than 15.
Chapter 6 Solutions
Modern Database Management (12th Edition)
Ch. 6 - Prob. 6.1RQCh. 6 - Prob. 6.2RQCh. 6 - Contrast the following terms: a. base table; view...Ch. 6 - Prob. 6.4RQCh. 6 - Prob. 6.5RQCh. 6 - Prob. 6.6RQCh. 6 - List six potential benefits of achieving an SQL...Ch. 6 - Prob. 6.8RQCh. 6 - Distinguish among data definition commands, data...Ch. 6 - Prob. 6.10RQ
Ch. 6 - Prob. 6.11RQCh. 6 - Prob. 6.12RQCh. 6 - Prob. 6.13RQCh. 6 - Drawing on material covered in prior chapters,...Ch. 6 - Explain and provide at least one example Of how to...Ch. 6 - Prob. 6.16RQCh. 6 - What is the difference between COUNT, COUNT...Ch. 6 - What is the evaluation order for the Boolean...Ch. 6 - If an SQL statement includes a GROUP BY clause,...Ch. 6 - Prob. 6.20RQCh. 6 - Prob. 6.21RQCh. 6 - Prob. 6.22RQCh. 6 - Explain why SQL is called a set-oriented language.Ch. 6 - When would the use of the LIKE key word with the...Ch. 6 - Prob. 6.25RQCh. 6 - Prob. 6.26RQCh. 6 - In what order are the clauses of an SQL statement...Ch. 6 - Within which clauses of an SQL statement can a...Ch. 6 - Prob. 6.29RQCh. 6 - Prob. 6.30RQCh. 6 - Prob. 6.31RQCh. 6 - Explain the difference between the WHERE and...Ch. 6 - Prob. 6.33RQCh. 6 - Prob. 6.34PAECh. 6 - Are based on the class scheduling 3NF relations...Ch. 6 - Prob. 6.36PAECh. 6 - Are based on the class scheduling 3NF relations...Ch. 6 - Are based on the class scheduling 3NF relations...Ch. 6 - Are based on the class scheduling 3NF relations...Ch. 6 - Prob. 6.40PAECh. 6 - Are based on the class scheduling 3NF relations...Ch. 6 - Prob. 6.42PAECh. 6 - Prob. 6.43PAECh. 6 - Are based on the class scheduling 3NF relations...Ch. 6 - Prob. 6.45PAECh. 6 - Prob. 6.46PAECh. 6 - Prob. 6.47PAECh. 6 - Prob. 6.48PAECh. 6 - Prob. 6.49PAECh. 6 - Prob. 6.50PAECh. 6 - Prob. 6.51PAECh. 6 - Prob. 6.52PAECh. 6 - Prob. 6.53PAECh. 6 - Modify the Product_T table by adding an attribute...Ch. 6 - Prob. 6.55PAECh. 6 - Add an order to the Order_T table and include a...Ch. 6 - Use the Pine Valley database to answer the...Ch. 6 - Prob. 6.58PAECh. 6 - Prob. 6.59PAECh. 6 - Prob. 6.60PAECh. 6 - Prob. 6.61PAECh. 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 - Prob. 6.72PAECh. 6 - Prob. 6.73PAECh. 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 - Prob. 6.80PAECh. 6 - Prob. 6.81PAECh. 6 - Prob. 6.82PAECh. 6 - Prob. 6.83PAECh. 6 - Prob. 6.84PAECh. 6 - Prob. 6.85PAE
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
- Assume the PRODUCT table contains multiple rows. The following code would include: SELECT P_DESCRIPT, P_PRICE FROM PRODUCT WHERE P_CODE IN(SELECT P_CODE FROM LINE GROUP BY P_CODE HAVING COUNT(*) > 1); Group of answer choices A) Select the products that have been ordered before. B) Select the products that have been ordered at least once. C) Select the products that have been ordered at least twice. D) An error message.arrow_forward7. For each project, display project name, project platform, project cost and total number of student involved. Label the columns as ProjectName, ProjectPlatform, ProjectCost and TotalStudentInvolved respectively. Order the query in ascending order by ProiectName. SQL statements:arrow_forwardFind the name and the age of the youngest graduate student (use subquery).arrow_forward
- Who has rented movies in Japanese language? Return only the first five distinct results in alphabetical order by last name.(Hints: In the language table, there is a field “name” that contains the film language names.) Display: first name and last namearrow_forwardList all information for each order item. Include an item total, which can be calculated by multiplying the Quantity and Paideach columns. Use a column alias for the calculated value to show the heading Item Total in the output.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 termination.arrow_forward
- Add the following row to the ADVENTURE_TRIP table: trip ID: 45; trip name: Jay Peak; Start location: Jay; state: VT; distance: 8; maximum group size: 8; type: Hiking and season: Summer. Display the contents of the ADVENTURE_TRIP table.arrow_forwardQ1- List all employees whose job_id is IT_PROG and hired after 01-JAN-95 and earning more than5000.Q2- List all employee except those with employee_id 101, 102, 103, 104 and 105Q3- Display the city attribute from locations table. Show the ones that contain “South” in the city.Sort the list in descending order.Q4- Display the first name, last name, salary, manager id and job id of all employees whose last fourcharacters of job id ends with “LERK”.Q5- Display the first name, last name and salary of all employees. Round the salary to the nearestunit of 1000 (ex. Salary=4500 New Salary=5000). Label the column as "New Salary".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_forward
- 1. For each sale made on June 1, 2015, show the following information: CustomerID, Customer name (lastname + comma + space + firstname) as 'CustomerName', SaleDate, Sum of Tax and Shipping as 'tax_shipping'. Sort it by customer last name. 2. For each sale made on June 1, 2015, show the following information: CustomerID, Customer name (lastname + comma + space + firstname) as 'CustomerName', SaleDate, ProductName, ItemSize, Quantity and the total amount of each sale item (quantity times SalePrice as 'SaleAmount'). Sort it by customer last name. Hint: The answer result will have a record for each SaleItem. 3. The color field in the Product table has a mix of single colors or multiple colors separated by commas. Provide a list of Products and replace every comma with a semicolon plus one space. Name the column 'OpenColor'. Show ProductID, ProductName, Composition, Category, and 'OpenColor'. For simplicity include only ProductIDs for products with a list price of less than $20 and…arrow_forwardBased on the ERD below, display the first name, last name and employee initial of anyone whose first name starts with “A”. (Hint: You will use a “Like” phrase.)arrow_forwardList the location number and unit number for every condo whose square footage is equal to or less than 1,084 square feet.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageA 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 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher: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
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning