¡El poder de los datos!

1

¡El poder de los datos!

Introducción a las bases de datos relacionales

2

Buenas prácticas de bases de datos con SQL

3

Tipos de datos en SQL

4

¿Cómo crear una base de datos en SQL?

5

Práctica: Tu primera consulta en bases de datos

6

Historia y Evolución de SQL

7

Práctica: Creación de Tablas en SQL (CREATE TABLE)

Manipulación de Datos

8

Insertando Datos con SQL (INSERT)

9

Consultas y Selecciones en SQL (SELECT)

10

Práctica: SELECT en SQL

11

Actualización de Datos con SQL (UPDATE)

12

Eliminación de Datos con SQL (DELETE)

13

Práctica: CRUD con SQL

Manipulación Avanzada de Datos

14

Instalación de MySQL Server y MySQL Workbench

15

¿Qué es la cláusula WHERE de SQL?

16

Filtrar y Ordenar Datos en SQL (LIKE)

17

Práctica: Filtrar Datos con WHERE en SQL

18

Cláusulas de Comparación Textual en SQL (AND, NULL, IN, NOT)

19

Funciones de Aritmética Básica en SQL (COUNT, SUM, AVG)

20

Funciones de Aritmética Básica en SQL (MIN, MAX)

Agrupación de Datos

21

Agrupación de Datos en SQL: GROUP BY, HAVING y CASE para Análisis Avanzado

22

Práctica: Agrupamiento y Ordenamiento de Datos

23

Tipos de JOIN en SQL

24

¿Cómo funciona INNER JOIN, LEFT JOIN, RIGHT JOIN y FULL JOIN?

25

Práctica: LEFT JOIN en SQL

Transformación de Datos

26

Vistas Materializadas en SQL: Como optimizar tus consultas y reportes.

27

Práctica: Crear Vistas Materializadas en SQL

28

Optimización de Bases de Datos con SQL: CREATE INDEX y TRIGGER

29

Vistas Materializadas y Temporales en SQL

30

Expresiones de Tablas Comunes (CTE) en SQL

Procedimientos Almacenados

31

Procedimientos Almacenados en SQL

32

Procedimientos Almacenados en SQL: Gestión de Variables y Manejo de Excepciones

Administración de Base de Datos

33

Respaldos y Restauración de Bases de Datos

34

Seguridad en Bases de Datos SQL

Análisis de Datos Avanzados

35

Potenciando los Datos en la Nube: Data Science, Big Data, ML e AI

36

SQL para Análisis de Datos: Primeros pasos con Power BI

No tienes acceso a esta clase

¡Continúa aprendiendo! Únete y comienza a potenciar tu carrera

No se trata de lo que quieres comprar, sino de quién quieres ser. Invierte en tu educación con el precio especial

Antes: $249

Currency
$209

Paga en 4 cuotas sin intereses

Paga en 4 cuotas sin intereses
Suscríbete

Termina en:

12 Días
3 Hrs
15 Min
32 Seg

Práctica: Filtrar Datos con WHERE en SQL

17/36

Aportes 70

Preguntas 0

Ordenar por:

¿Quieres ver más aportes, preguntas y respuestas de la comunidad?

Que increible prueba, la he realizado asi: `SELECT *` `FROM COURSES` `WHERE n_reviews > 0;` `SELECT *` `FROM COURSES` `WHERE n_reviews BETWEEN 1 AND 100;` `SELECT name` `FROM COURSES` `WHERE name LIKE "%SQL%";`
```js SELECT * FROM COURSES WHERE n_reviews >= 1; SELECT * FROM COURSES WHERE n_reviews BETWEEN 1 AND 100; SELECT name FROM COURSES WHERE name like '%sql%' ```
![](https://static.platzi.com/media/user_upload/image-78b4de80-1e30-4021-9446-9c7041dc96ab.jpg)
No me carga la practica 09/11/2024 500 Internal Server Error
SELECT \*FROM COURSES where n\_reviews >0; SELECT \*FROM COURSES where n\_reviews between 1 and 100; SELECT NAME FROM COURSES WHERE NAME LIKE '%SQL%';
Comparto la respuesta: SELECT \*FROM COURSESWHERE n\_reviews >=1; SELECT \*FROM COURSESWHERE n\_reviews between 1 and 100; SELECT \*FROM COURSESWHERE name like '%SQL%';
SELECT \* FROM COURSES WHERE n\_reviews > 1;SELECT \* FROM COURSES WHERE n\_reviews BETWEEN 1 AND 100;SELECT \* FROM COURSES WHERE name LIKE '%SQL%';
![](https://static.platzi.com/media/user_upload/image-c9ca27ef-49a6-4729-9d26-ed308fab0e0a.jpg)
\-- Escribe tu código aquí 👇SELECT \*FROM COURSESwhere n\_reviews>0; SELECT \*FROM COURSESwhere n\_reviewsbetween 1 and 100; SELECT \*FROM COURSESwhere name like '%SQL%';
![](https://static.platzi.com/media/user_upload/image-87ac01a1-03e9-45f8-940c-d8ac90adf1ed.jpg)
mi aporte: SELECT \*FROM COURSESWHERE N\_REVIEWS >=1; SELECT \*FROM COURSESWHERE N\_REVIEWS BETWEEN 1 AND 100; SELECT \*FROM COURSESWHERE NAME LIKE '%SQL%';
Acá dejo mi aporte: ```js SELECT * FROM COURSES WHERE N_REVIEWS >=1; SELECT * FROM COURSES WHERE N_REVIEWS BETWEEN 1 AND 100; SELECT * FROM COURSES WHERE NAME LIKE '%SQL%'; ```SELECT \*FROM COURSESWHERE N\_REVIEWS >=1; SELECT \*FROM COURSESWHERE N\_REVIEWS BETWEEN 1 AND 100; SELECT \*FROM COURSESWHERE NAME LIKE '%SQL%';
Mi solución, aunque no fue tan sencillo llegar a ella: ```python SELECT * FROM COURSES WHERE n_reviews > 0; SELECT * FROM COURSES WHERE n_reviews BETWEEN 1 AND 100; SELECT * FROM COURSES WHERE name LIKE '%SQL%'; ```SELECT \* FROM COURSES WHERE n\_reviews > 0;SELECT \* FROM COURSES WHERE n\_reviews BETWEEN 1 AND 100;SELECT \* FROM COURSES WHERE name LIKE '%SQL%';
\-- Escribe tu código aquí 👇SELECT \* FROM COURSESWHERE N\_REVIEWS > 0; SELECT \* FROM COURSESWHERE N\_REVIEWS BETWEEN 1 AND 100; SELECT name FROM COURSESWHERE name LIKE "%SQL%";
\-- Seleccionar todos los cursos con al menos 1 reviewSELECT \* FROM courses WHERE n\_reviews >= 1;-- Seleccionar todos los cursos con entre 1 y 100 reviewsSELECT \* FROM courses WHERE n\_reviews BETWEEN 1 AND 100;-- Seleccionar los nombres de los cursos que contienen "SQL"SELECT name FROM courses WHERE name LIKE '%SQL%';
```txt -- Escribe tu código aquí 👇 SELECT * FROM COURSES WHERE n_reviews >= 1; SELECT * FROM COURSES WHERE n_reviews BETWEEN 1 AND 100; SELECT name FROM COURSES WHERE name LIKE '%SQL%'; ```
SELECT \* FROM COURSES where n\_reviews >= 1; SELECT \* FROM COURSES where n\_reviews between 1 and 100; SELECT name from COURSESwhere name like '%sql%';
`SELECT *` `FROM COURSES` `WHERE n_reviews != 0;` `SELECT * FROM COURSES` `WHERE n_reviews BETWEEN 1 and 100;` `SELECT name FROM COURSES` `WHERE name LIKE '%SQL%';`
Me gusto este ejercicio. Aqui les muestro mi respuesta: ![](file:///D:/01%20-%20CURSOS%20PLATZI/13%20-%20BD%20DE%20CERO/1%20-%20BASE%20DE%20DATOS%20SQL/03%20-%20MANIPULACION%20AVANZADA%20DE%20DATOS/TEMA%204%20-%20PRACTICA-FILTRAR%20DATOS%20SQL/PASO%206%20-%20VER%20RESULTADOS%20EN%20PRUEBAS.PNG)-- Escribe tu código aquí 👇SELECT \*FROM COURSESWHERE n\_reviews > 0; SELECT \* FROM COURSESWHERE n\_reviews BETWEEN 1 AND 100; SELECT name FROM COURSESWHERE name LIKE '%SQL%';```js -- Escribe tu código aquí 👇 SELECT * FROM COURSES WHERE n_reviews > 0; SELECT * FROM COURSES WHERE n_reviews BETWEEN 1 AND 100; SELECT name FROM COURSES WHERE name LIKE '%SQL%'; ```
`-- Escribe tu código aquí 👇SELECT * FROM COURSESWHERE n_reviews >=1;` `SELECT * FROM COURSESWHERE n_reviews BETWEEN 1 AND 100;` `SELECT name FROM COURSES WHERE name LIKE "%SQL%";`
Y yo FELIZ: ![](https://static.platzi.com/media/user_upload/image-5064fbcb-e0d7-40b7-8798-b4bcc885500d.jpg)
\-- Escribe tu código aquí 👇SELECT \*FROM COURSESWHERE n\_reviews >= 1; SELECT \*FROM COURSESWHERE n\_reviews BETWEEN 1 AND 100; SELECT nameFROM COURSESWHERE name LIKE "%SQL%";
Este es mi respuesta frente al reto en la primera parte no use mayor o igual a 1 o a 0 lo que hice fue usar el de diferente "!=" \-- PARTE 1 SELECT \* FROM COURSES WHERE n\_reviews != 0; \-- PARTE 2 SELECT \* FROM COURSES WHERE n\_reviews BETWEEN 1 AND 100; \-- PARTE 3 SELECT \* FROM COURSES WHERE name LIKE '%SQL%' ![](https://static.platzi.com/media/user_upload/image-2eed07b7-4712-42fe-93ed-559490cedfa2.jpg)
Recuerden borrar la sentencia que propone el ejercicio al inicio. Y solo dejar lo que piden. SELECT \* FROM COURSESWHERE n\_reviews > 1; SELECT \* FROM COURSESWHERE n\_reviews BETWEEN 1 AND 100; SELECT \* FROM COURSESWHERE name LIKE '%SQL%';
`SELECT * FROM COURSESWHERE n_reviews >= 1;` `SELECT * FROM COURSESWHERE n_reviews BETWEEN 1 AND 100;` `SELECT nameFROM COURSESWHERE name like "%SQL%";`
`SELECT * FROM COURSES WHERE n_reviews > 0;SELECT * FROM COURSES WHERE n_reviews  BETWEEN 1 AND 100;SELECT NAME FROM COURSES WHERE NAME LIKE "%SQL%";`
SELECT \* FROM COURSES WHERE n\_reviews >=1; SELECT \* FROM COURSESWHERE n\_reviews BETWEEN 1 AND 100; SELECT name FROM COURSESWHERE name LIKE "%SQL%";
interesante, ![](https://static.platzi.com/media/user_upload/image-5ca8ed1a-080d-4714-ae37-5425fa5d0035.jpg)
![]()![](https://static.platzi.com/media/user_upload/image-5977545a-1d2e-47b9-800a-1c4205bbb59e.jpg)![](https://static.platzi.com/media/user_upload/image-8b539fee-f5c3-4ae2-98fb-e3f80dac0977.jpg)
SELECT \*FROM COURSESWHERE N\_REVIEWS BETWEEN 1 AND 100; SELECT \* FROM COURSES WHERE name  LIKE "%SQL%";
![](https://static.platzi.com/media/user_upload/image-f7b0393d-6fee-4492-9563-92e7f6fe1386.jpg)
SELECT \*FROM COURSESWHERE n\_reviews >0; SELECT \* FROM COURSESWHERE n\_reviews between 1 AND 100; SELECT \* FROM COURSESWHERE name LIKE '%SQL%';
![](https://static.platzi.com/media/user_upload/image-002b17cd-f537-4ea2-a2d2-de098305ddd6.jpg)
![](https://static.platzi.com/media/user_upload/image-7e0313da-e784-47ec-a0a4-58c5e603faf0.jpg)
Mi respuesta \-- Escribe tu código aquí 👇 SELECT \*FROM courses WHERE n\_reviews > 1; \--Reto2--> SELECT \*FROM courses WHERE n\_reviews BETWEEN 1 AND 100; \--Reto3--> SELECT name FROM courses WHERE name LIKE "%SQL%";
SELECT \*FROM COURSES WHERE n\_reviews>0 ; SELECT \* FROM COURSES WHERE n\_reviews BETWEEN 1 AND 100; SELECT \* FROM COURSES WHERE name LIKE '%SQL%'
![](https://static.platzi.com/media/user_upload/image-e0f073c2-67ab-47f5-a016-87d7cd911339.jpg)
SELECT id, name, n\_reviews FROM courses WHERE (n\_reviews > 0)    OR (n\_reviews BETWEEN 1 AND 100)    OR (name LIKE '%SQL%');
![](https://static.platzi.com/media/user_upload/image-fa01033e-da28-4989-b099-8a358c072257.jpg)![](https://static.platzi.com/media/user_upload/image-5b1a6b80-23e4-475b-b315-6eba5493adce.jpg)
![](https://static.platzi.com/media/user_upload/image-69857293-c96b-47d6-ad18-982a753b954f.jpg)
MI SOLUCION: ```js SELECT * FROM COURSES WHERE n_reviews > 0; SELECT * FROM COURSES WHERE n_reviews BETWEEN 1 AND 100; SELECT name FROM COURSES WHERE name LIKE "%SQL%"; ```
![](https://static.platzi.com/media/user_upload/image-51625dd2-7c66-40ec-a4cd-6202b1447e9d.jpg)
A continuación mis queries: ```js -- Escribe tu código aquí 👇 SELECT * FROM COURSES WHERE n_reviews >= 1; SELECT * FROM COURSES WHERE n_reviews BETWEEN 1 AND 100; SELECT name FROM COURSES WHERE name LIKE '%SQL%'; ```
![](https://static.platzi.com/media/user_upload/image-f70b3dcc-8409-4920-9bd0-09cf71cb0825.jpg)![](https://static.platzi.com/media/user_upload/image-5384d75d-c197-47ed-8f96-2e44df4feb88.jpg)
```txt -- Escribe tu código aquí 👇 SELECT * FROM COURSES WHERE n_reviews > 1; SELECT * FROM COURSES WHERE n_reviews BETWEEN 1 AND 100; SELECT NAME FROM COURSES WHERE NAME LIKE '%SQL%'; ```-- Escribe tu código aquí 👇SELECT \* FROM COURSESWHERE n\_reviews > 1; SELECT \* FROM COURSESWHERE n\_reviews BETWEEN 1 AND 100; SELECT NAME FROM COURSESWHERE NAME LIKE '%SQL%';
![](https://static.platzi.com/media/user_upload/image-5462f38d-86eb-4f1f-8140-35e80f770ff3.jpg)
SELECT \*FROM COURSESWHERE 1 =1 AND n\_reviews >= 1; SELECT \* FROM COURSESWHERE 1 = 1 AND n\_reviews BETWEEN 1 AND 100; SELECT NAME FROM COURSESWHERE 1 = 1 AND NAME LIKE '%SQL%';
LIKE es un operador utilizado principalmente en cláusulas WHERE para buscar patrones en datos de texto SELECT name FROM COURSES WHERE name LIKE "%SQL%";
![](https://static.platzi.com/media/user_upload/image-6e32fc0e-66b0-40c5-bc3e-8ab818509dda.jpg)Así fue como yo lo hice
![](https://static.platzi.com/media/user_upload/image-f7bc5fd9-f02d-4cb8-a064-f899154fb308.jpg)
SELECT \* FROM COURSESWHERE n\_reviews > 1; SELECT \* FROM COURSESWHERE n\_reviews BETWEEN 1 AND 100; SELECT \* FROM COURSESWHERE NAME LIKE '%SQL%'
![](https://static.platzi.com/media/user_upload/image-f9487d21-952f-4153-b6af-0ad39597cea5.jpg)
```js -- 1 consulta SELECT * FROM COURSES WHERE n_reviews > 1; -- 2da consulta SELECT * FROM COURSES WHERE n_reviews BETWEEN 1 AND 100; -- 3ra Consulta SELECT name FROM COURSES WHERE name LIKE "%SQL%"; ```-- 1 consultaSELECT \* FROM COURSESWHERE n\_reviews > 1; \-- 2da consultaSELECT \* FROM COURSESWHERE n\_reviews BETWEEN 1 AND 100; \-- 3ra ConsultaSELECT name FROM COURSESWHERE name LIKE "%SQL%";
`SELECT * FROM COURSES where n_reviews > 1;` `select * from courses where n_reviews between 1 and 100;` `select name from courses where name like '%SQL%';`
Mi ejercicio ```html -- Escribe tu código aquí 👇 SELECT * FROM COURSES WHERE N_REVIEWS > 0; SELECT * FROM COURSES WHERE N_REVIEWS BETWEEN 1 AND 100; SELECT * FROM COURSES WHERE NAME LIKE "%SQL%"; ```
SELECT \* FROM COURSES WHERE n\_reviews > 0; SELECT \* FROM COURSES WHERE n\_reviews > 1 AND n\_reviews <= 100; SELECT \* FROM COURSES WHERE name LIKE "%SQL%";
```js SELECT * FROM COURSES WHERE n_reviews > 0; SELECT * FROM COURSES WHERE n_reviews >= 1 AND n_reviews <= 100; SELECT name FROM COURSES WHERE name LIKE '%SQL%'; ```SELECT \* FROM COURSESWHERE n\_reviews > 0; SELECT \* FROM COURSESWHERE n\_reviews >= 1 AND n\_reviews <= 100; SELECT name FROM COURSESWHERE name LIKE '%SQL%';
```js SELECT * FROM COURSES WHERE n_reviews > 0; SELECT * FROM COURSES WHERE n_reviews >= 1 AND n_reviews <= 100; SELECT name FROM COURSES WHERE name LIKE '%SQL%'; ```
![](https://static.platzi.com/media/user_upload/image-6db0d301-5a8f-4084-91e7-1d0e77fb3f04.jpg)
![](https://static.platzi.com/media/user_upload/imagen-9f8a76a3-83f7-45e1-8d96-5300bbf1bea3.jpg)
\-- Escribe tu código aquí 👇SELECT \* FROM COURSES C WHERE C.n\_reviews > 0; SELECT \* FROM COURSES C WHERE C.n\_reviews BETWEEN 1 AND 100; SELECT \* FROM COURSES C WHERE C.name LIKE '%SQL%';
Me encanta este pedo del confeti 🥳🎊 ![](https://static.platzi.com/media/user_upload/image-7363b7db-c0d5-444f-9592-7b5027813594.jpg)
![](https://static.platzi.com/media/user_upload/image-e21427e8-8b94-46c8-9a47-7d2176f78a97.jpg)
![](https://static.platzi.com/media/user_upload/image-0f50b8c6-1aec-466e-8b72-81a9bb293bf9.jpg)![](https://static.platzi.com/media/user_upload/image-f83ad1d4-1437-4ab2-b141-7d6ec6262c67.jpg)
![](https://static.platzi.com/media/user_upload/image-6b907aa0-f03b-4346-81ce-79ff212af4dc.jpg)![](https://static.platzi.com/media/user_upload/image-7a3a87f9-e5ca-42c4-abb1-bbf1c2561336.jpg)
SELECT \* FROM COURSES WHERE n\_reviews > 0;SELECT \* FROM COURSES WHERE n\_reviews BETWEEN 1 AND 100;SELECT \* FROM COURSES WHERE name LIKE "%SQL%";
SELECT \*FROM COURSES WHERE n\_reviews > 0; SELECT \* FROM COURSES WHERE n\_reviews BETWEEN 1 AND 100; SELECT \* FROM COURSES WHERE name LIKE '%SQL%';
Lo realicé de esta manera: `SELECT * FROM COURSES C WHERE C.n_reviews > 0;` `SELECT * FROM COURSES C WHERE C.n_reviews BETWEEN 1 AND 100;` `SELECT * FROM COURSES C WHERE C.name LIKE '%SQL%';`
![](https://static.platzi.com/media/user_upload/image-8b51ced8-a689-4c35-b79e-bd34dace3646.jpg) Lo tengo bien escrito y me ejecuta porque rayos me dice que no, que rabia
Si usan 'SQL' da error al utilizar comillas simples, "%SQL%" Con comillas funciona perfectamente. ```js SELECT * FROM COURSES WHERE n_reviews > 0; SELECT * FROM COURSES WHERE n_reviews BETWEEN 1 AND 100; SELECT name FROM COURSES WHERE name LIKE "%SQL%"; ```SELECT \*FROM COURSESWHERE n\_reviews > 0; SELECT \*FROM COURSESWHERE n\_reviews BETWEEN 1 AND 100; SELECT nameFROM COURSESWHERE name LIKE "%SQL%";
undefined