How group_by more than one field in frappe

Attendances = frappe.db.get_list('Attendance',
fields=['COUNT(*) AS count', 'employee_name', 'status', 'attendance_date', 'shift', 'leave_type'],
group_by=['shift', 'status']

group_by parameter in frappe.db.get_list() function does not support grouping by multiple fields directly.

To achieve grouping by multiple fields, you would typically have to resort to post-processing the results of your query in Python. You would retrieve the data without grouping and then use Python to group the results based on multiple fields.