I have two tables: ITEMS with quantities and unit_price (id | name | order_id | qt | unit_price) and table ORDERS.
ITEMS
ORDERS
I want to UPDATE<
UPDATE<
You can UPDATE with JOINing the two tables:
UPDATE
JOIN
UPDATE Orders o INNER JOIN ( SELECT order_id, SUM(qt * unit_price) 'sumu' FROM items GROUP BY order_id ) i ON o.id = i.order_id SET o.total_price = i.sumu [WHERE predicate]