sql - In getting the not a single-group group function error on this query, how can i solve this? -


in getting not single-group group function error on query, how can solve this?

select to_char(fecha_ingreso,'dy') dia,        count(num_dept) n   empleados  group dia 

the question simple, should write:

select to_char(fecha_ingreso,'dy') dia,        count(num_dept) n empleados group to_char(fecha_ingreso,'dy') 

this because select clause evaluated after group clause.


Comments