AtomLearn
DashboardGoalsGraphAchievementsReviewSign In
SQL & DatabasesNot Started

SQL SELECT

Query data with SELECT, WHERE, ORDER BY, LIMIT

0%

Knowledge Debt detected

You can study this freely — but your score may plateau if these foundations have gaps. The Mastery badge requires them to be solid.

Partial Coverage

This skill is being actively expanded. You'll get real value from what's here, but it doesn't cover everything yet.

Available now:

  • SELECT, WHERE, ORDER BY, LIMIT
  • JOINs (INNER, LEFT, RIGHT)
  • Aggregates & GROUP BY
  • Indexes & Performance

Coming soon:

  • Transactions & ACID
  • Database Design & Normalization
  • Window Functions
  • Query Optimization with EXPLAIN

Explanation

SELECT retrieves data from database tables.

sql
SELECT name, age
FROM users
WHERE age > 18
ORDER BY name ASC
LIMIT 10;

Key clauses (in order):

  • 1. SELECT — which columns to return (* = all)
  • 2. FROM — which table
  • 3. WHERE — filter rows (optional)
  • 4. ORDER BY — sort (ASC/DESC)
  • 5. LIMIT — cap the number of results

DISTINCT removes duplicates: SELECT DISTINCT city FROM users

Examples

Filter and sort

Find top 5 highest-paid engineers

SELECT id, name, salary
FROM employees
WHERE department = 'Engineering'
  AND salary > 80000
ORDER BY salary DESC
LIMIT 5;

Next in SQL & Databases

SQL JOINs

Continue