MariaDB [practica1]> select * from estudiante; +--------+-------------------------+------+---------------------+-------------------------------------+--------------+-------------+---------------------------------------+---------+-------------------------------------------------------------+ | carnet | nombre | sexo | car_infom | deporte | Religion | valor_semes | dias_clase | jornada | detalles | +--------+-------------------------+------+---------------------+-------------------------------------+--------------+-------------+---------------------------------------+---------+-------------------------------------------------------------+ | 681010 | Mario Luis Arroyave | m | Tecnico profesional | Ciclismo,Voleibol,otro | Cristianismo | 1100000.00 | lunes,martes,miercoles,jueves,viernes | am | individualista | | 701002 | Gloria Maria Zabaleta | f | Tec_DesarrolloS | Ciclismo,Beisbol,Voleibol,otro | Cristianismo | 1820000.00 | lunes,viernes,sabado | am | intelectual,le gusta el trabajo en equipo | | 701962 | Roberto Carlos Porro | m | Tec_DesarrolloS | Baloncesto,Ciclismo,otro | Hinduismo | 1820000.00 | lunes,viernes,sabado | am | intelectual,le gusta el trabajo en equipo | | 702240 | Jairo Harley Usuga | m | Tec_DesarrolloS | Baloncesto,Futbol,Ciclismo,Voleibol | Cristianismo | 1600000.00 | lunes,martes,miercoles,viernes | am | no viene a clases, es individualista | | 752040 | Maria Camila Zapata | f | Ing_sistemas | Baloncesto,Natacion,otro | Hinduismo | 2450000.00 | lunes,martes,viernes | am | buen estudiante, colaborador, le gusta el trabajo en equipo | | 752314 | Gloria Zamora Perez | f | Ing_sistemas | Natacion,otro | Cristianismo | 2800000.00 | lunes,miercoles,sabado | am | Buena estudiante,creativa,dinamica,colaboradora | | 758962 | Margarita Julio Beltran | f | Ing_sistemas | Baloncesto,otro | Cristianismo | 2450000.00 | martes,jueves,viernes | pm | intelectual,colaboradora,creativa | | 901112 | Jorge Luis Arroyo | m | Espec_seguridad | Natacion,Ciclismo,Beisbol,Voleibol | Islam | 4200000.00 | viernes,sabado | am | intelectual,le gusta el trabajo en equipo,colaborador | | 902031 | Samuel Julio Beltran | m | Espec_seguridad | Natacion,Ciclismo,Voleibol | Sijismo | 4200000.00 | sabado | am | Le gusta el trabajo en equipo,intelectual | +--------+-------------------------+------+---------------------+-------------------------------------+--------------+-------------+---------------------------------------+---------+-------------------------------------------------------------+ 9 rows in set (0.002 sec) MariaDB [practica1]> describe estudiante; +-------------+--------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------------------------------------------------------------------------+------+-----+---------+-------+ | carnet | varchar(12) | NO | PRI | NULL | | | nombre | varchar(30) | NO | | NULL | | | sexo | varchar(1) | YES | | NULL | | | car_infom | enum('Ing_sistemas','Tec_DesarrolloS','Tecnico profesional','Espec_seguridad') | YES | | NULL | | | deporte | set('Baloncesto','Futbol','Natacion','Ciclismo','Beisbol','Voleibol','otro') | YES | | NULL | | | Religion | enum('Cristianismo','judaismo','Budismo','Islam','Hinduismo','Sijismo') | YES | | NULL | | | valor_semes | decimal(12,2) | YES | | NULL | | | dias_clase | set('lunes','martes','miercoles','jueves','viernes','sabado') | YES | | NULL | | | jornada | enum('am','pm') | YES | | NULL | | | detalles | blob | YES | | NULL | | +-------------+--------------------------------------------------------------------------------+------+-----+---------+-------+ 10 rows in set (0.042 sec) MariaDB [practica1]> select carnet,nombre from estudiante where religion = "Cristianismo"; +--------+-------------------------+ | carnet | nombre | +--------+-------------------------+ | 681010 | Mario Luis Arroyave | | 701002 | Gloria Maria Zabaleta | | 702240 | Jairo Harley Usuga | | 752314 | Gloria Zamora Perez | | 758962 | Margarita Julio Beltran | +--------+-------------------------+ 5 rows in set (0.001 sec) MariaDB [practica1]> select carnet, nombre from estudiante where religion="Cristianismo" and find in set ("lunes", dias_clase) and find in set ("sabado", dias_clase); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'set ("lunes", dias_clase) and find in set ("sabado", dias_clase)' at line 1 MariaDB [practica1]> select carnet, nombre from estudiante where religion="Cristianismo" and find_in_set ("lunes", dias_clase) and find_in_set ("sabado", dias_clase); +--------+-----------------------+ | carnet | nombre | +--------+-----------------------+ | 701002 | Gloria Maria Zabaleta | | 752314 | Gloria Zamora Perez | +--------+-----------------------+ 2 rows in set (0.001 sec) MariaDB [practica1]> select carnet, nombre from estudiante where religion != "Cristianismo" and find_in_set("viernes",dias_clase) and car_inform != "Espec_seguridad" and find_in_set("ciclismo",deporte) and find_in_set("baloncesto",deporte); ERROR 1054 (42S22): Unknown column 'car_inform' in 'where clause' MariaDB [practica1]> select carnet, nombre from estudiante where religion != "Cristianismo" and find_in_set("viernes",dias_clase) and car_infom != "Espec_seguridad" and find_in_set("ciclismo",deporte) and find_in_set("baloncesto",deporte); +--------+----------------------+ | carnet | nombre | +--------+----------------------+ | 701962 | Roberto Carlos Porro | +--------+----------------------+ 1 row in set (0.001 sec) MariaDB [practica1]> select carnet, nombre from estudiante where car_infom != "Tecnico profesional" and nombre like %l% and find_in_set("voleibol",deporte) and religion != "cristianismo" and valor_semes between 1700000 and 4300000; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%l% and find_in_set("voleibol",deporte) and religion != "cristianismo" and va...' at line 1 MariaDB [practica1]> select carnet, nombre from estudiante where car_infom != "Tecnico profesional" and nombre like '%l%' and find_in_set("voleibol",deporte) and religion != "cristianismo" and valor_semes between 1700000 and 4300000; +--------+----------------------+ | carnet | nombre | +--------+----------------------+ | 901112 | Jorge Luis Arroyo | | 902031 | Samuel Julio Beltran | +--------+----------------------+ 2 rows in set (0.001 sec) MariaDB [practica1]> select avg(valor_semes) as "VALOR PROMEDIO" from estudiante where car_infom = "Ing_sistemas"; +----------------+ | VALOR PROMEDIO | +----------------+ | 2566666.666667 | +----------------+ 1 row in set (0.001 sec) MariaDB [practica1]> select carnet, nombre from estudiante where nombre like '%n' and find_in_set("sabado",dias_clase) and convert(detalles using utf8) like '%intelectual%'; +--------+----------------------+ | carnet | nombre | +--------+----------------------+ | 902031 | Samuel Julio Beltran | +--------+----------------------+ 1 row in set (0.002 sec) MariaDB [practica1]> exit