Подзапрос немного менее многословен, чем объединение.
drop table if exists t,t1;
create table t
(table1id int, year int, deposit int, interest int);
insert into t values
( 1,2019 , 20 , 1),
( 2,2019 , 20 , 2),
( 3,2019 , 20 , 1),
( 3,2019 , 20 , 2),
( 3,2020 , 20 , 3),
( 3,2020 , 20 , 4);
create table t1
( table2id int, year int, otherinterest int);
insert into t1 values
( 1 , 2019 , 10 ),
( 2 , 2019 , 10 );
select t.year,sum(deposit),sum(interest),
(select sum(otherinterest) from t1 where t1.year = t.year) otherinterest
FROM t
group by t.year;
+------+--------------+---------------+---------------+
| year | sum(deposit) | sum(interest) | otherinterest |
+------+--------------+---------------+---------------+
| 2019 | 80 | 6 | 20 |
| 2020 | 40 | 7 | NULL |
+------+--------------+---------------+---------------+
2 rows in set (0.00 sec)