-
-
Save parzibyte/ee2dedc01e2004c98b0e58526ca6bf57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select e.nombre, e.apellido_paterno, e.apellido_materno, e.sueldo, | |
( | |
select coalesce(json_agg(bonos), '[]') | |
from ( | |
select cantidad, | |
concepto | |
from bonos_empleado_nomina | |
where id_nomina = 3 | |
and id_empleado = e.id | |
) bonos | |
) bonos | |
from empleados e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment