I have the following tables
TABLE1
id
value
table2
TABLE2
id
table3
TABLE3
id
And with that, I would like to average TABLE 1, with WHERE in the TABLE 3 parameters with Hibernate / persistence, where my tables are objects.
It would look like this: SELECT AVG (value) FROM table1 WHERE table1.table2.table3.id = N?