SELECT is the single most important statement in SQL — data analysts spend 90% of their time reading data, not writing it. This tutorial covers the building blocks you will combine in every query.
Key Points
- Select everything: SELECT * FROM employees; (fine for exploring, avoid in production)
- Select specific columns: SELECT name, salary FROM employees;
- Rename output with aliases: SELECT salary * 12 AS annual_salary
- Remove duplicates: SELECT DISTINCT department FROM employees;
- Combine with WHERE, ORDER BY, LIMIT for targeted results
- Use expressions and functions directly: SELECT UPPER(name), ROUND(salary, 0)
.png)