Está en la página 1de 1

Inscriptos apuntados a natacion

create table natacion select numerosocio, ano, cuota from inscriptos JOIN profes
ores ON inscriptos.deporte=profesores.codigo where inscriptos.deporte=2;
mysql> select * from natacion;
+-------------+------+-------+
| numerosocio | ano | cuota |
+-------------+------+-------+
| 102 | 2006 | s |
| 104 | 2006 | s |
| 109 | 2006 | s |
+-------------+------+-------+
3 rows in set (0.00 sec)
Numero de socios inscriptos en el año 2005
mysql> create table socios2005 select numerosocio, deporte, cuota from inscripto
s JOIN deportes ON inscriptos.deporte=deportes.codigo where inscriptos.ano='2005
';
mysql> select * from socios2005;
+-------------+---------+-------+
| numerosocio | deporte | cuota |
+-------------+---------+-------+
| 102 | 2 | s |
| 110 | 2 | s |
| 111 | 2 | s |
+-------------+---------+-------+
3 rows in set (0.01 sec)

También podría gustarte