:
ERROR:  Attribute categoria.orden must be GROUPed or used in an aggregate function

SELECT count(id_cat) FROM categoria where id_cat_padre = 461 and activo = 1 order by orden;
error: ERROR:  Attribute categoria.orden must be GROUPed or used in an aggregate function