Skip to content

Instantly share code, notes, and snippets.

@adjmedina
Created October 6, 2012 06:21
Show Gist options
  • Save adjmedina/3844204 to your computer and use it in GitHub Desktop.
Save adjmedina/3844204 to your computer and use it in GitHub Desktop.
Consulta de los pagos
Select deposito.concepto, referencias.refnumerica1, referencias.refnumerica2, deposito.descripcion, deposito.fecha, CONCAT(apaterno, ' ', amaterno, ' ', nombre)as nombre, matricula, idgrupo_fk, deposito.importe as deposito, referencias.importe1, referencias.importe2, 0 as importe
from deposito, referencias, alumnos where alumnos.idalumno = referencias.idalumno_fk1
and (deposito.concepto = referencias.refnumerica1 or deposito.concepto = referencias.refnumerica2)
and deposito.fecha = '2012-10-01';
## La versión por mes
Select deposito.concepto, referencias.refnumerica1, referencias.refnumerica2, deposito.descripcion, deposito.fecha, CONCAT(apaterno, ' ', amaterno, ' ', nombre)as nombre, matricula, idgrupo_fk, deposito.importe as deposito, referencias.importe1, referencias.importe2, 0 as importe
from deposito, referencias, alumnos where alumnos.idalumno = referencias.idalumno_fk1
and (deposito.concepto = referencias.refnumerica1 or deposito.concepto = referencias.refnumerica2)
and month(referencias.fechalimite1) = '10' and referencias.id_cicloes_fk = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment