Question: Provide sql queries for the question. The table schema is given below. 4. List all customer names with all book titles each customer has purchased
Provide sql queries for the question. The table schema is given below.


4. List all customer names with all book titles each customer has purchased from the computer category. (Hint: This is an extension of query 3 with an added AND clause) 5. Once a year the book store offers a weeklong promotion in which customers receive a gift based on the value of each book purchased. If a customer purchases a book with a retail price of $12 or less the customer receives a bookmark. The promotion table lists all the gifts with the range values of retail price for each gift. Based on price of the book can you tell which gift the customer will receive during the promotion week? 6. Sometimes customers refer other customers and get a discount. In this case, the referred column of customers stores the customer\# of the customer who has referred this customer. List all customers that have been referred by existing customers. Use the column alias and concat operators to list the name of customer who was referred in the first column and name of the customer who referred this customer in the second column. (Hint: this query will use self join) 7. Return all order numbers and names of the customers who placed them. Order this result by customer last name. 8. Show all book titles along with the names of their publishers as "Publisher". 9. List all books published by the publisher with pubid 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
