une suite d instructions executees dans un ordre clair.
atelier
SQL
parcours pratique pour apprendre SQL depuis zero
definition d abord
ce que signifie SQL
SQL sert a ecrire des instructions precises. Ici tu l abordes comme parcours pratique pour apprendre SQL depuis zero. Commence par une idee simple: des entrees passent par des etapes et deviennent une sortie.
query.sqlexecuter psql -f query.sqlhabitude apprends une petite piece de SQL, tape un exemple minimal et execute-leune valeur est une donnee. Une variable est le nom qui la garde.
un petit travail nomme qui recoit une entree et produit un resultat.
PostgreSQL compatible SQL execute le code de query.sql.
premier code lisible
Select
columns table rowsSELECT name, score FROM users;
sortie name score rowslignee du langage
arbre de SQL
vois d ou vient SQL, quels langages sont proches, et quoi apprendre ensuite.
parcours debutant
Banque de questions
Chercher puis pratiquer
Choisis une etape ou cherche dans la banque de ce langage puis ouvre l exercice.
SQL question 1
SQL question 1. Choisis l explication qui correspond le mieux a select columns.
SQL question 2
SQL question 2. Choisis l explication qui correspond le mieux a where filter.
SQL question 3
SQL question 3. Choisis l explication qui correspond le mieux a count aggregate.
SQL question 4
SQL question 4. Choisis l explication qui correspond le mieux a join tables.
SQL question 5
SQL question 5. Choisis l explication qui correspond le mieux a select columns.
SQL question 6
SQL question 6. Choisis l explication qui correspond le mieux a where filter.
SQL question 7
SQL question 7. Choisis l explication qui correspond le mieux a count aggregate.
SQL question 8
SQL question 8. Choisis l explication qui correspond le mieux a join tables.
SQL question 9
SQL question 9. Choisis l explication qui correspond le mieux a select columns.
SQL question 10
SQL question 10. Choisis l explication qui correspond le mieux a where filter.
SQL question 11
SQL question 11. Choisis l explication qui correspond le mieux a count aggregate.
SQL question 12
SQL question 12. Choisis l explication qui correspond le mieux a join tables.
SQL question 13
SQL question 13. Choisis l explication qui correspond le mieux a select columns.
SQL question 14
SQL question 14. Choisis l explication qui correspond le mieux a where filter.
SQL question 15
SQL question 15. Choisis l explication qui correspond le mieux a count aggregate.
SQL question 16
SQL question 16. Choisis l explication qui correspond le mieux a join tables.
SQL question 17
SQL question 17. Choisis l explication qui correspond le mieux a select columns.
SQL question 18
SQL question 18. Choisis l explication qui correspond le mieux a where filter.
choix multiple
SQL question 1
SQL question 1. Choisis l explication qui correspond le mieux a select columns.
SELECT name FROM users;
reference
modeles pour query.sql
psql -f query.sqlcolumns table rows
Select
SELECT name, score FROM users;
- Select only needed columns
- Read from one table first
- Add limits while exploring
where order limit
Filter
SELECT name FROM users WHERE score >= 60;
- WHERE filters rows
- ORDER BY sorts
- LIMIT protects exploration
count sum avg group by
Group
SELECT role, COUNT(*) FROM users GROUP BY role;
- Aggregate after filtering
- Group by non aggregate columns
- Name metrics clearly