Metadata-Version: 2.4
Name: tkinter_win
Version: 0.1.0
Summary: Add your description here
Requires-Python: >=3.5
Description-Content-Type: text/markdown
Requires-Dist: pillow>=7.2.0
Requires-Dist: pymysql>=0.10.1

SELECT oi.order_id, SUM(oi.quantity * (SELECT SUM(s.quantity * m.price) FROM specifications s 
JOIN materials m ON s.material_id = m.id 
WHERE s.product_id = oi.product_id)) as total_cost
FROM order_items oi
GROUP BY oi.order_id;
