SELECT
fname,
MONTH(eventDate),
SUM(IF(WEEKDAY(eventDate) < 5,1,0)) AS WeekdayCount,
SUM(IF(WEEKDAY(eventDate) >= 5,1,0)) AS WeekendCount
FROM eventcal AS e
LEFT JOIN users AS u ON e.primary = u.username
GROUP BY fname, MONTH(eventDate);
Anda ingin melakukan agregasi Anda (dalam hal ini SUM) di SELECT, dan GROUP BY bagaimana Anda ingin mereka dijumlahkan (menurut fname, menurut MONTH).