Last active
August 29, 2015 14:23
-
-
Save mrios/cdad4879745404f200a0 to your computer and use it in GitHub Desktop.
Movimiento por persona
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 * | |
FROM `internacion_movimiento` as mov | |
INNER JOIN `internacion_persona` as pi | |
WHERE mov.persona_internacion_id = pi.id | |
AND pi.persona_id = 5703 | |
AND mov.tipo_evento_id IS NULL ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+------+---------------------+
| id | siguiente_evento_id |
+------+---------------------+
| 640 | 641 |
| 641 | 674 |
| 674 | NULL |
| 5392 | 5393 |
| 5393 | 5394 |
| 5394 | 5576 |
| 5576 | 5696 |
| 5696 | 5724 |
| 5724 | 6005 |
| 6005 | 6065 |
| 6063 | NULL |
| 6064 | NULL |
| 6065 | 6350 |
| 6350 | NULL |
| 7553 | NULL |
+------+---------------------+
15 rows in set (0,00 sec)