009b - Tutorial SQL en Español Interactivo Con Intérprete SQL
009b - Tutorial SQL en Español Interactivo Con Intérprete SQL
Utiliza el menú y sigue las lecciones para aprender SQL por tu cuenta.
SELECT *
Lección 9: DISTINCT
SELECT specific
By putting DISTINCT after SELECT, you do not return duplicates.
columns
WHERE ... Equals For example, if you run
SELECT DISTINCT gender, species FROM friends_of_pickles WHERE height_cm < 100;, you
WHERE ...
will get the gender/species combinations of the animals less than 100cm in height.
Greater than
WHERE ... Note that even though there are multiple male dogs under that height, we only see one
Greater than or row that returns "male" and "dog".
equal
Can you return a list of the distinct species of animals greater than 50cm in height?
AND
ORDER BY
SQL: Resultado:
LIMIT # of SELECT id, species FROM friends_of_pickles id species
returned rows WHERE height_cm > 50;
1 human
COUNT(*)
2 human
COUNT(*) ...
WHERE 7 dog
SUM
AVG Run SQL
Column alias
Resultado esperado:
Self joins
species
LIKE
human
CASE
dog
SUBSTR
COALESCE