我有一个表Employees
,它的字段如下:
Employee_name,Employee_id,Employee_status,Employee_loc,last_update_time.
该表没有任何约束。我已经尝试了以下查询。
select Employee_name, count(1)
from Employees
where Employee_status = 'ACTIVE'
Group by Employee_name,Employee_loc
having count(Employee_name) > 1
order by count(Employee_name) desc
在选择中,我也需要获得Employee_id
.. 任何人都可以帮助您如何获得它吗?