SELECT tab1.name, (SELECT CASE tab1.id WHEN 1 THEN 1 ELSE 1 END) AS idd , sum(tab2.amount) FROM tab1, tab2 WHERE idd = tab2.idTab1 GROUP BY 1;
SELECT tab1.name, (SELECT CASE WHEN tab1.id >2 THEN tab1.id-1 END) AS idd , sum(tab2.amount) FROM tab1, tab2 WHERE idd = tab2.idTab1 GROUP BY 1;
Работает.