Try something like this (use your date separator):
select
quarter(date('01/'||month_no||'/'||year_no)),
year_no,
sum(amount)
from
t1 a,
t2 b
where
a.calendar_id = b.calendar_id
group by
quarter(date('01/'||month_no||'/'||year_no)),
year_no
HTH,
Alphonsus.