Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 20, 2021 20:43
Show Gist options
  • Save parzibyte/e13dd4b64cfbb70e3a6a3f947ea99146 to your computer and use it in GitHub Desktop.
Save parzibyte/e13dd4b64cfbb70e3a6a3f947ea99146 to your computer and use it in GitHub Desktop.
MariaDB [login]> SELECT usuarios.id, usuarios.correo,
-> (SELECT COUNT(*) FROM intentos_usuarios WHERE id_usuario = usuarios.id)intentos_fallidos
-> FROM usuarios;
+----+---------------------+-------------------+
| id | correo | intentos_fallidos |
+----+---------------------+-------------------+
| 1 | parzibyte@gmail.com | 2 |
| 2 | luis@gmail.com | 1 |
+----+---------------------+-------------------+
2 rows in set (0.000 sec)
MariaDB [login]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment