select t.nomer, t1.`summa` prmysyac , t2.`summa` tekywiymesiac from database.table t left join
(select nomer, `summa` from database.table where month(sostoyanienadatu)=9 ) t1 using(nomer) left join
(select nomer, `summa` from database.table where month(sostoyanienadatu)=10 ) t2 using (nomer) GROUP BY nomer;