Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在此查询中出现 not a single-group group function 错误时,我该如何解决?
select to_char(fecha_ingreso,'DY') dia, count(num_dept) n from empleados group by dia
这个问题太简单了,你应该写:
select to_char(fecha_ingreso,'DY') dia, count(num_dept) n from empleados group by to_char(fecha_ingreso,'DY')
这是因为 select 子句在 group by 子句之后进行评估。