just write the code Answer the questions using the database below

just write the code Answer the questions using the database below. Tables and data contained in the database of a company that sells stationery products are given below. 1. Write the query listing the number and name of the customer who ordered the maximum quantity of the product named “Pen”. 2. Create a view named “Unsold_Products” that lists the numbers, names, stock numbers and total price of the products that have not been ordered yet. 3. When a new order is added, write the trigger that updates the stock quantity information of that product in the products table. When answering the questions, assume that each order will contain one type of product. PK: Primary Key FK: Foreign Key The queries should be prepared in MAMP program to run in MySQL. Trigger will be created by typing SQL command, not interface Transcribed Image Text: 中
Products
Orders
Customers
Product No (PK)
Order number (PK)
Customer _number (PK)
Product Name
Product No (FK)
Customer_name
Price
Customer_number (FK)
Address
Stock_ Quantity
Piece
History
Products Table:
Product_Name
pencil
Product_No (FK)
Price
Stock_ Quantity
1
100
10
2
notebook
50
30
3
eraser
10
40
4
ruler
75
23
Orders Table:
Order number Product_No
(PK)
Customer_number Piece
(FK)
History
(FK)
10
2
111
2
2020-12-05
11
1
111
1
2020-12-06
12
111
34
2020-12-07
13
1
112
2020-12-07
Customers Table:
Customer_number (PK)
Address
Customer_name
Ayse yilmaz
Veli can
Ali ay
Çankaya Ankara
Karşıyaka Tokat
Dikmen Ankara
111
112
113

-25-


Buy plagiarism free, original and professional custom paper online now at a cheaper price. Submit your order proudly with us



Essay Hope