I'm trying to pass this query to update I do a subtraction with 2 different tables but the update gives me an error because I do not recognize the other table here I put the query to see if you can give me an idea how you should build the update in jpql.
SELECT
t1.Kilometrost - t2.kilometrost
FROM
Historial t1
JOIN
t1.equipo t2
WHERE
t1.id='9452'