https://www.mysqltutorial.org/mysql-group-by.aspx/
https://guru99.es/aggregate-functions/
select first_name, last_name, sum(amount) total , count(amount) numero , avg(amount) media, max(amount) maximo , min(amount) minimo from customer join payment using (customer_id) group by customer_id