首页 > 解决方案 > ORA-00936: 缺少表达式(为超过 2 个属性工作的员工的姓名)

问题描述

我不确定我缺少什么表情,

在此处输入图像描述

select first_name from employee
where Employee_ID in
(select Employee_ID from service
where Property_ID having count(*)>2);

标签: sqloracle

解决方案


根据标题,您正在尝试编写:

select e.first_name
from employee e
group by e.Employee_ID, e.first_name
having count(distinct Property_ID) > 2;

您没有解释数据的结构,但您可以使用having count(*) > 2.


推荐阅读