Advertisement
jotazetaec

Untitled

Jul 31st, 2024
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. select m.*,(select i.creditos_tomados from esq_inscripciones.inscripcion i
  2. join esq_datos_personales.personal p on p.idpersonal = i.idpersonal
  3. join esq_mallas.malla_escuela me on me.idmalla = i.idmalla
  4. where p.cedula = m.cedula and me.codigo_caces = m.carrera and i.anulado = 'N' and i.idescuela > 0
  5. and i.idperiodo in(167,168)
  6. )
  7. from esq_investigacion.matriz7 m where
  8. m.periodo = '2023-05-08'
  9. union
  10. select m.*,(select i.creditos_tomados from esq_inscripciones.inscripcion i
  11. join esq_datos_personales.personal p on p.idpersonal = i.idpersonal
  12. join esq_mallas.malla_escuela me on me.idmalla = i.idmalla
  13. where p.cedula = m.cedula and me.codigo_caces = m.carrera and i.anulado = 'N' and i.idescuela > 0
  14. and i.idperiodo in(180,181)
  15. )
  16. from esq_investigacion.matriz7 m where
  17. m.periodo = '2023-10-02'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement