Skip to content
Learn Netverks

Lesson

Step 1/36 3% through track

intro

Introduction to SQL

Last reviewed May 28, 2026 Content v20260528
Track mode
sql_sandbox
Means
SQL sandbox
Reading
~3 min
Level
beginner

This lesson

An orientation to the SQL track—relational concepts, query patterns, and how to practice until the SQL sandbox lab ships.

You need a clear map of the SQL track so tables, keys, JOINs, and aggregates do not feel like magic.

You will apply Introduction to SQL in contexts like: Postgres, MySQL, SQLite, warehouses, and ORMs that still expose SQL.

Copy SQL from each lesson into SQLite (sqlite3), DB Fiddle, or local Postgres—read result grids and row counts. The in-browser SQL lab (sql_sandbox) will run queries when the runner ships; until then, local clients are the practice path. Also read the interview prep blocks.

After basic programming literacy—before ORM-heavy frameworks assume you can read the SQL they generate.

How this SQL track works

  • Read-focused — no in-browser SQL lab yet — copy queries into SQLite (sqlite3), DB Fiddle, or local Postgres. The track uses execution_profile: sql_sandbox, but the playground is not wired yet.
  • ANSI SQL first — dialect-neutral lessons; when syntax differs, notes point to MySQL and PostgreSQL tracks.
  • Pair withPython and Data Science for analytics; Django and PHP for app integration.
  • Prerequisites — basic computer literacy; Intro to Programming helps. Spreadsheet or CSV experience is enough to start.

Practice in a throwaway database. Use CREATE TABLE samples from lessons—never run destructive SQL on production data.

Install on your device (macOS, Linux, Windows)

Practice SQL with the sqlite3 CLI or a GUI—no server required for basics.

macOS

  1. brew install sqlite (often preinstalled).
  2. GUI options: DB Browser for SQLite, TablePlus, DBeaver.

Linux

  1. sudo apt install -y sqlite3 or sudo dnf install -y sqlite

Windows

  1. winget install SQLite.SQLite or DB Browser installer.

Verify: sqlite3 --version then sqlite3 :memory: "SELECT 1;"

SQL (Structured Query Language) is the standard language for reading and writing data in relational databases. Whether you build web apps with Django or PHP, analyze datasets in Data Science, or automate scripts in Python, SQL is how you ask questions of structured data.

How this track works

This is a read-focused track: the in-browser SQL lab is not wired yet (execution_profile: sql_sandbox). Copy each example into your own client—SQLite CLI, DB Fiddle, or Postgres—and observe result grids.

Lessons teach dialect-neutral ANSI SQL. When MySQL or Postgres differ, we note it and point to dedicated tracks later.

What you will learn

  • Core queries: SELECT, WHERE, JOINs, aggregates, subqueries
  • Schema design: tables, keys, constraints, indexes, normalization
  • Advanced SQL: window functions, CTEs, views, transactions, EXPLAIN
  • Modeling and apps: ER diagrams, migrations, ORMs vs raw SQL

Your first query

SELECT 'SQL track ready' AS message;

Practice: Copy SQL into sqlite3 practice.db, DB Fiddle, or a local Postgres session. Compare row counts and column names with the lesson.

A SELECT returns a result set—rows and columns—without changing stored data.

Safety note

Practice on sample databases you create. Never run DROP or unqualified DELETE on production. Always double-check WHERE clauses before updates.

Important interview questions and answers

  1. Q: What is SQL used for?
    A: Defining schemas, querying relational data, and enforcing integrity in applications and analytics.
  2. Q: Why no in-browser runner yet?
    A: SQL sandboxes need careful isolation; until the lab ships, local or hosted clients are the safe practice path.

Self-check

  1. In one sentence, what does a relational database store?
  2. Name two other tracks that use SQL heavily.

Challenge

Try SQL in SQLite

  1. Install SQLite or use DB Fiddle.
  2. Run sqlite3 practice.db (or open a blank fiddle).
  3. Execute SELECT 'SQL track ready' AS message; and read the result grid.

Done when: you see a single row with the message column.

Tip: Finish this lesson's SQLite challenge before moving on—every later lesson assumes you can run SELECT locally.

Interview prep

What is SQL in one sentence?

A declarative language for defining, querying, and modifying relational data.

Why is this track read-focused?

The in-browser SQL lab is not wired yet; learners practice in SQLite, DB Fiddle, or Postgres.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • Why learn SQL?
  • SQLite or Postgres?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump