SELECT SUM(p.price * it.quantity)
FROM Product p, Item it
WHERE it.invoice_number = 11731
  AND it.product_code = p.product_code