MariaDB [subconsultas]> select*from articulo; +--------+------------+----------+---------------+------------+ | codigo | articulo | cantidad | valorunitario | existencia | +--------+------------+----------+---------------+------------+ | 150 | nevera | 25 | 950000 | 0 | | 200 | televisor | 11 | 1200000 | 0 | | 250 | estufa | 30 | 750000 | 0 | | 300 | ventilador | 17 | 110000 | 0 | | 350 | lavadora | 13 | 980000 | 0 | +--------+------------+----------+---------------+------------+ 5 rows in set (0.011 sec) MariaDB [subconsultas]> select articulo,if(valorunitario>100000 and valorunitario<=950000, 'economico','Costoso') from articulo; +------------+---------------------------------------------------------------------------+ | articulo | if(valorunitario>100000 and valorunitario<=950000, 'economico','Costoso') | +------------+---------------------------------------------------------------------------+ | nevera | economico | | televisor | Costoso | | estufa | economico | | ventilador | economico | | lavadora | Costoso | +------------+---------------------------------------------------------------------------+ 5 rows in set (0.002 sec) MariaDB [subconsultas]> select articulo,if(valorunitario>100000 and valorunitario<=950000, 'economico','Costoso') Clasificacion from articulo; +------------+---------------+ | articulo | Clasificacion | +------------+---------------+ | nevera | economico | | televisor | Costoso | | estufa | economico | | ventilador | economico | | lavadora | Costoso | +------------+---------------+ 5 rows in set (0.000 sec) MariaDB [subconsultas]> select articulo,if(valorunitario<=950000, 'Porcentaje de Aumento el 25%','Porcentaje de aumento del 40%') Incremento from articulo; +------------+-------------------------------+ | articulo | Incremento | +------------+-------------------------------+ | nevera | Porcentaje de Aumento el 25% | | televisor | Porcentaje de aumento del 40% | | estufa | Porcentaje de Aumento el 25% | | ventilador | Porcentaje de Aumento el 25% | | lavadora | Porcentaje de aumento del 40% | +------------+-------------------------------+ 5 rows in set (0.001 sec) MariaDB [subconsultas]> select*from articulo; +--------+------------+----------+---------------+------------+ | codigo | articulo | cantidad | valorunitario | existencia | +--------+------------+----------+---------------+------------+ | 150 | nevera | 25 | 950000 | 0 | | 200 | televisor | 11 | 1200000 | 0 | | 250 | estufa | 30 | 750000 | 0 | | 300 | ventilador | 17 | 110000 | 0 | | 350 | lavadora | 13 | 980000 | 0 | +--------+------------+----------+---------------+------------+ 5 rows in set (0.001 sec) MariaDB [subconsultas]> select case(weekday('2025-08-30')) when 0 then 'lunes' when 1 then 'martes' when 2 then 'miercoles' when 3 then 'jueves' when 4 then 'viernes' when 5 then 'sabado' when 6 then 'domingo' end; +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | case(weekday('2025-08-30')) when 0 then 'lunes' when 1 then 'martes' when 2 then 'miercoles' when 3 then 'jueves' when 4 then 'viernes' when 5 then 'sabado' when 6 then 'domingo' end | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | sabado | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.004 sec) MariaDB [subconsultas]> select case(weekday('2006-05-28')) when 0 then 'lunes' when 1 then 'martes' when 2 then 'miercoles' when 3 then 'jueves' when 4 then 'viernes' when 5 then 'sabado' when 6 then 'domingo' end; +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | case(weekday('2006-05-28')) when 0 then 'lunes' when 1 then 'martes' when 2 then 'miercoles' when 3 then 'jueves' when 4 then 'viernes' when 5 then 'sabado' when 6 then 'domingo' end | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | domingo | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.001 sec)