I need to write a simple query as a part of larger function to join two tables. The tables are as under
Table1
Code Subactivity
647 1
647 2
648 3
648 4
Table 2
Subactivity Hours
1 5
2 10
3 7
4 3
The final output should look like
Code hours
647 15
648 10
I have done this before, but today I just cant get my head around it..
Result