Given the following Relations:
Where state can be: paid, delivered, pending, or canceled.
Provide SQL instructions for each of the following questions.
DO NOT USE NESTED SUBQUERIES UNLESS IT IS STRICTLY NECESSARY.
1.Create the schema. Include keys and foreign keys.
2.List invoice id and date of all paid invoices.
3.For invoice id=234567 list the customer’s name as well as the product description for each product in the invoice.
4.Assuming a 6% sales tax, produce a list of all delivered invoices including the total amount (with and without tax).
5.Name(s) of customer(s) who have bought the most products.
6.List name(s) of customer(s) in decreasing order of total amount spent.
7.List the total sales for each month.