/* List total instructor payments by month */
/* MySql */

select lname, fname, month, sum(gross_pay), sum(tax), sum(net_pay), count(*) as "number of payments"
from payment join instructor using(instructor_id)
             join dates       using(date_id)
group by lname, fname, month WITH ROLLUP