Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. select
  2. empleado."name",
  3. sucursal.nombre as sucursal,
  4. empleado.birthday as "fecha_nacimiento",
  5. contrato.date_start as "inicio",
  6. to_char(empleado.birthday, 'dd-mm') as cumple
  7.  
  8.  
  9. FROM hr_employee as empleado
  10. LEFT JOIN hr_contract as contrato on contrato.employee_id = empleado."id"
  11. left join res_sucursal as sucursal on sucursal.id=empleado.sucursal_id
  12. where contrato.date_end IS NULL
  13. and contrato.subcompania_id=1
  14.  
  15. ORDER BY to_char(empleado.birthday, 'mm dd') ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement