Skip to content

Instantly share code, notes, and snippets.

Created Jan 17, 2022
What would you like to do?
select e.nombre, e.apellido_paterno, e.apellido_materno, e.sueldo,
select coalesce(json_agg(bonos), '[]')
from (
select cantidad,
from bonos_empleado_nomina
where id_nomina = 3
and id_empleado =
) bonos
) bonos
from empleados e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment