SQL intermedio con IA
Jasmin Ludolf
Senior Data Science Content Developer
$$
💻 Mejora tus habilidades en SQL y IA:
Ordenar Agrupar Filtrar Resumir
Categorías personalizadas
$$
¡Todo con instrucciones!


⚠️ Siempre pide permiso antes de compartir contexto con IA

Instrucción: Muestra todos los títulos de películas alfabéticamente
SELECT title
FROM films
ORDER BY title ASC;
|title |
|--------------------------|
|#Horror |
|10 Cloverfield Lane |
|10 Days in a Madhouse |
|10 Things I Hate About You|
|10,000 B.C. |
|102 Dalmatians |
...
$$
$$
ASC Orden ascendente:Instrucción: Muestra todos los títulos de películas en orden descendente
SELECT title
FROM films
ORDER BY title DESC;
|title |
|--------------------------|
|Æon Flux |
|xXx: State of the Union |
|xXx (Triple X) |
|eXistenZ|
...
$$
$$
DESC para descendente$$
⬆ Orden ascendente
$$
⬇ ️ Orden descendente
SELECT title
FROM films
ORDER BY release_year;
|title |
|------------------------------|
|Intolerance: Love's Struggl...|
|Over the Hill to the Poorhouse|
|The Big Parade |
|Metropolis |
...
Instrucción: Muestra títulos y años de estreno, ordenados por año de estreno
SELECT title, release_year
FROM films
ORDER BY release_year;
|title |release_year|
|------------------------------|------------|
|Intolerance: Love's Struggle |1916 |
|Over the Hill to the Poorhouse|1920 |
|The Big Parade |1925 |
|Metropolis |1927 |
...
SELECT title, oscar
FROM awards
ORDER BY oscar DESC;
|title |oscar|
|-------------------------------|-----|
|Lord of the Rings:Return of ...|11 |
|Titanic |11 |
|Ben-Hur |11 |
SELECT title, oscar, bafta
FROM awards
ORDER BY oscar DESC, bafta DESC;
|title |oscar|bafta|
|--------------------|-----|-----|
|Lord of the Rings...|11 |2 |
|Ben-Hur |11 |1 |
|Titanic |11 |0 |
Instrucción: Muestra títulos de películas y años de estreno ordenados por año descendente y luego título ascendente
SELECT title, release_year
FROM films
ORDER BY release_year DESC, title ASC;
|title |release_year|
|----------------|------------|
|10,000 B.C. | |
|A Touch of Frost| |
|Anger Management| |
|Animal Kingdom | |
...
SQL intermedio con IA