Roll up functionality in SQL

in the exercise on "Roll up ", I don’t get the same results as shows, here is my query, slightly different but it works. Also , in group by i don’t mention the original name (name) but the alias method and still it works, can someone help. Thanks !

Select as method,
sum(amount) as tot_amount
payment_methods paym
left join payments pay
on paym.payment_method_id = pay.payment_id
group by method with ROLLUP;