I have 3 tables
- Table 1 - table1_id, title
- Table 2 - table2_id, table1_id
- Table 3 - table3_id, table2_id
Here Table 2 has reference of Table 1 there can be multiple Table 2 rows referring Table 1 and Table 3 is referring to Table 2 there can be multiple Table 3 rows referring to Table 2.
There is an one-many relationship between Table1-Table2 and Table2-Table3
Now I want the sum of all the rows in Table 3 with table1_id
Input- table1_id = "abc"
Output- 9
PS- Sorry for such abstract description , its quite difficult to explain here if needed I can add some more details.
