:
ERROR:  column "categoria.orden" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...oria where id_cat_padre = 461 and activo = 1 order by orden;
                                                                 ^

SELECT count(id_cat) FROM categoria where id_cat_padre = 461 and activo = 1 order by orden;
error: ERROR:  column "categoria.orden" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...oria where id_cat_padre = 461 and activo = 1 order by orden;
                                                                 ^