Basic SQL Concepts
SQL: What you need to know
SQL is pronounced either as the initialism “S-Q-L” (ess-cue-el) or as the word “sequel” (ˈsiːkwəl). Both are widely accepted in the tech industry, though “S-Q-L” is often considered more official, while “sequel” is common due to the language’s original name.
SQL Commands are the specific “action verbs” you use, while SQL Syntax is the “grammar” or the set of rules that tells you how to combine those verbs into a sentence the computer understands.
Commands vs. Syntax
Think of it like learning English:
Command: The word “Eat.”
Syntax: The rule that says you should say “I want to eat an apple,” not “Apple eat I want.”
In SQL, a command is a single keyword like SELECT. The syntax is the requirement that SELECT must always come before FROM.
The “Essential” Syntax Structure
If your students learn only one thing, it should be the Standard Query Block. This is the foundation of almost every data analysis task.
| Syntax Element | Function | English Equivalent |
| SELECT | Defines the columns you want. | “Tell me the…” |
| FROM | Defines the table/source. | “…from the list of…” |
| WHERE | Filters the results. | “…but only the ones that…” |
| ORDER BY | Sorts the results. | “…and put them in order by…” |
| LIMIT | Restricts the number of rows. | “…and just show me the top 5.” |
Useful Vocabulary – SQL Foundations for Data Analysts
Learn 12 Basic SQL Concepts in 15 Minutes
SQL Quick Summary
The Goal of SQL: It is the language used to “talk” to Relational Databases (tables connected by IDs).
The Big Six (The Syntax Order): You must write your query in this specific order, even if you don’t use every command:
SELECT: Which columns do you want to see? (Use
*for all).FROM: Which table are you looking at?
WHERE: What is the filter for the raw data? (e.g.,
price > 100).GROUP BY: Which column are you using to organize the rows? (e.g., by
grade_level).HAVING: What is the filter for your grouped data? (e.g.,
average_gpa < 3.3).ORDER BY: How should the results be sorted? (
ASCfor lowest first,DESCfor highest first).
Key Tools & Techniques
Functions: Use
COUNT()to see how many rows exist, orAVG()to find the average value of a column.DISTINCT: Use this immediately after
SELECTto remove duplicate rows and see only unique values.LIMIT: Use this at the very end of a query to see only a specific number of rows (e.g.,
LIMIT 5).Joins: Use a LEFT JOIN to connect two different tables using a shared column (like a
Student_ID). This allows you to see data from both places at once.