Question: Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer the sub-questions. Customer (id, name, city,

Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer

Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer the sub-questions. Customer (id, name, city, credit card) Merchant (id, name, city, account) Merchant-Phone (id, phone) Handling-Fee (product id, handling rate, description) Purchase (purchase id, time, date, customer_id) Product (product_id, description, price, merchant_id) Consist (purchase id, product_id, quantity) Figure 1: Product -Purchase tracking a) Identify the foreign keys in this schema. (6 marks) b) Display the customer's id for all customer who have purchased product on "T0/06/2019" or on "11/06/2019". (8 marks) c) For each merchant, display the id and total amount of money that its products cost (disregarding handling fees), under the condition that the total amount is greater than 500. The result should be ordered in descending order of the total amount. (6 marks) Activate Window Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer the sub-questions. Customer (id, name, city, credit card) Merchant (id, name, city, account) Merchant-Phone (id, phone) Handling-Fee (product id, handling rate, description) Purchase (purchase id, time, date, customer_id) Product (product_id, description, price, merchant_id) Consist (purchase id, product_id, quantity) Figure 1: Product -Purchase tracking a) Identify the foreign keys in this schema. (6 marks) b) Display the customer's id for all customer who have purchased product on "T0/06/2019" or on "11/06/2019". (8 marks) c) For each merchant, display the id and total amount of money that its products cost (disregarding handling fees), under the condition that the total amount is greater than 500. The result should be ordered in descending order of the total amount. (6 marks) Activate Window Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer the sub-questions. Customer (id, name, city, credit card) Merchant (id, name, city, account) Merchant-Phone (id, phone) Handling-Fee (product id, handling rate, description) Purchase (purchase id, time, date, customer_id) Product (product_id, description, price, merchant_id) Consist (purchase id, product_id, quantity) Figure 1: Product -Purchase tracking a) Identify the foreign keys in this schema. (6 marks) b) Display the customer's id for all customer who have purchased product on "T0/06/2019" or on "11/06/2019". (8 marks) c) For each merchant, display the id and total amount of money that its products cost (disregarding handling fees), under the condition that the total amount is greater than 500. The result should be ordered in descending order of the total amount. (6 marks) Activate Window Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer the sub-questions. Customer (id, name, city, credit card) Merchant (id, name, city, account) Merchant-Phone (id, phone) Handling-Fee (product id, handling rate, description) Purchase (purchase id, time, date, customer_id) Product (product_id, description, price, merchant_id) Consist (purchase id, product_id, quantity) Figure 1: Product -Purchase tracking a) Identify the foreign keys in this schema. (6 marks) b) Display the customer's id for all customer who have purchased product on "T0/06/2019" or on "11/06/2019". (8 marks) c) For each merchant, display the id and total amount of money that its products cost (disregarding handling fees), under the condition that the total amount is greater than 500. The result should be ordered in descending order of the total amount. (6 marks) Activate Window Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer the sub-questions. Customer (id, name, city, credit card) Merchant (id, name, city, account) Merchant-Phone (id, phone) Handling-Fee (product id, handling rate, description) Purchase (purchase id, time, date, customer_id) Product (product_id, description, price, merchant_id) Consist (purchase id, product_id, quantity) Figure 1: Product -Purchase tracking a) Identify the foreign keys in this schema. (6 marks) b) Display the customer's id for all customer who have purchased product on "T0/06/2019" or on "11/06/2019". (8 marks) c) For each merchant, display the id and total amount of money that its products cost (disregarding handling fees), under the condition that the total amount is greater than 500. The result should be ordered in descending order of the total amount. (6 marks) Activate Window

Step by Step Solution

3.33 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the provided relational schema in Figure 1 here are the SQL statements that correspond to t... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!