我想对字段进行分组,但想显示名为的列的所有行remain
:
这是没有分组的当前输出:
并与组输出:
当我分组时我想要这个:
这是mysql查询:
SELECT staff.name,
staff.designation_id_designation,
staff.status_id_status,
Concat_Ws('=', leave_remain.leave_type_id_leave_type, leave_remain.days) AS
remain
FROM staff INNER JOIN
leave_remain ON staff.id_staff = leave_remain.staff_id_staff
GROUP BY staff.name