Questions from Database Management


Q: Write an SQL query to list each customer who has bought computer

Write an SQL query to list each customer who has bought computer desks and the number of units sold to each customer. Show how you constructed this query using a Venn or other type of diagram.

See Answer

Q: Write an SQL query to list each customer who bought at least

Write an SQL query to list each customer who bought at least one product that belongs to product line Basic in March 2018. List each customer only once.

See Answer

Q: Modify Problem and Exercise 6-59 so that you include the

Modify Problem and Exercise 6-59 so that you include the number of products in product line Basic that the customer ordered in March 2018. Data from Problem and Exercise 6-59: Write an SQL query to l...

See Answer

Q: Modify Problem and Exercise 6-60 so that the list includes

Modify Problem and Exercise 6-60 so that the list includes the number of products each customer bought in each product line in March 2018. Data from Problem and Exercise 6-60: Modify Problem and Exer...

See Answer

Q: Refer to the EER diagram for patients in Figure 3-3

Refer to the EER diagram for patients in Figure 3-3. Make any assumptions you believe are necessary. Develop sample definitions for each entity type, attribute, and relationship in the diagram. Data...

See Answer

Q: List, in alphabetical order, the names of all employees (

List, in alphabetical order, the names of all employees (managers) who are now managing people with skill ID BS12; list each manager’s name only once, even if that manager manages several people with...

See Answer

Q: Display the salesperson name, product finish, and total quantity sold

Display the salesperson name, product finish, and total quantity sold (label as TotSales) for each finish by each salesperson.

See Answer

Q: Write a query to list the number of products produced in each

Write a query to list the number of products produced in each work center (label as TotalProducts). If a work center does not produce any products, display the result with a total of 0.

See Answer

Q: The production manager at PVFC is concerned about support for purchased parts

The production manager at PVFC is concerned about support for purchased parts in products owned by customers. A simple analysis he wants done is to determine for each customer how many vendors are in...

See Answer

Q: Display the order IDs for customers who have not made any payment

Display the order IDs for customers who have not made any payment, yet, on that order. Use the set command UNION, INTERSECT, or MINUS in your query.

See Answer