POSTGRESQL There is a database of the furniture and carpentry workshop. It includes information on: - products (product
Posted: Fri May 20, 2022 1:37 pm
POSTGRESQL
There is a database of the furniture and carpentry workshop. It includes information on:
- products (product code, name, cost, production time in days, category)
E.g. 0001, round table, 7, furniture
0002, window frame, 10, carpentry
- orders (date of the order, product, quantity of the product).
Tasks.
1.Create all necessary tables with primary and foreign keys.
2.Fill the tables using insert queries (at least 5 products and 7 orders).
3.Output the order details with the value of cost of the order,
cost of the order = cost*quantity of the product.
4.Output the information about the total cost of the orders for each category. The information must include: the category of the product and the total cost of the orders for this category.
5.Write a query that outputs for each order the planned date and time of completion,
the planned date of completion = date of the order + production time in days.
Please show the script for the tasks
There is a database of the furniture and carpentry workshop. It includes information on:
- products (product code, name, cost, production time in days, category)
E.g. 0001, round table, 7, furniture
0002, window frame, 10, carpentry
- orders (date of the order, product, quantity of the product).
Tasks.
1.Create all necessary tables with primary and foreign keys.
2.Fill the tables using insert queries (at least 5 products and 7 orders).
3.Output the order details with the value of cost of the order,
cost of the order = cost*quantity of the product.
4.Output the information about the total cost of the orders for each category. The information must include: the category of the product and the total cost of the orders for this category.
5.Write a query that outputs for each order the planned date and time of completion,
the planned date of completion = date of the order + production time in days.
Please show the script for the tasks