Teyro
CoursesFor creatorsBlog
Log inGet started
Tey Mascot
LOADING.

Every expert you admire was once a beginner who refused to quit.

Teyro

The fun way to finish learning coding and AI: short daily lessons with streaks, leagues and friends.

Get the app

Learn

  • All courses
  • Learn coding
  • Learn AI
  • Learn online
  • How it works
  • Leagues
  • Get the app

Creators

  • Teach on Teyro
  • How teaching works
  • Teach coding online
  • Teach AI online
  • Join as a Founding Creator
  • Creator log in

Resources

  • Blog
  • Features
  • Use cases
  • Compare
  • FAQ

Legal

  • Terms of Use
  • Privacy Policy

© 2026 Teyro · support@teyro.app

HomeBlogSkill Building & Careers
Skill Building & Careers

What Is SQL? A Tutorial for Beginners With Examples

What SQL is and what it's used for, with simple examples of SELECT, WHERE, GROUP BY and JOIN so you can read and write your first queries.

The Teyro TeamOct 25, 20262 min read
On this page9 sections
  1. Direct answer
  2. A table
  3. Core commands
  4. Where SQL is used
  5. Different database systems
  6. Next steps
  7. Where Teyro fits
  8. The bottom line
  9. More SQL guides

Almost every app you use stores information in a database. SQL is how you ask it questions.

Direct answer

SQL (Structured Query Language) is the standard language for working with relational databases, which store data in tables of rows and columns. With a few commands you can read data (SELECT), filter it (WHERE), summarise it (GROUP BY) and combine tables (JOIN).

A table

A database table looks like a spreadsheet:

idfilmseats_soldprice
1Starlight1209
2Moonrise808
3Sunset1509

Core commands

Read everything

SELECT * FROM shows;

Pick columns and filter

SELECT film, seats_sold
FROM shows
WHERE seats_sold > 100;

Sort

SELECT film FROM shows ORDER BY seats_sold DESC;

Summarise

SELECT price, SUM(seats_sold) AS total_seats
FROM shows
GROUP BY price;

Combine two tables

SELECT customers.name, bookings.seat
FROM bookings
JOIN customers ON customers.id = bookings.customer_id;

Change data

INSERT INTO shows (film, seats_sold, price) VALUES ('Aurora', 0, 9);
UPDATE shows SET price = 10 WHERE film = 'Moonrise';

Always use WHERE with UPDATE and DELETE, or you'll change every row.

Where SQL is used

  • Apps and websites
  • Business reports and dashboards
  • Finance, health, logistics
  • Data analysis. See how to become a data scientist.

Different database systems

SQLite, MySQL, PostgreSQL and SQL Server differ slightly, but the core is the same.

Next steps

Learn in order with how to learn SQL for beginners, practise with SQL practice for beginners.

Where Teyro fits

Teyro's SQL and Databases for Beginners runs real SQLite in your browser: you query a cinema's booking database in every lesson. It is free to start.

The bottom line

SQL is a short list of ideas that cover most of what you'll do. Learn them by running them.

More SQL guides

  • How to learn SQL for beginners
  • Free SQL courses for beginners
  • SQL practice for beginners
  • SQL course

Frequently asked questions

What is SQL?

Structured Query Language, the standard language for asking questions of and changing data in relational databases.

What is SQL used for?

Getting data out of databases, summarising it, and adding or changing records. It's behind most apps and many analyst jobs.

Is SQL hard to learn?

The core reads like English and is one of the easier languages to start with. Joins and design take practice.

What is the difference between SQL and a database?

A database stores data in tables. SQL is the language you use to talk to it.

Run these queries yourself

SQL and Databases for Beginners runs real SQL in your browser, with a cinema booking database. 50 lessons, free to start.

See the SQL course

Free to start · No credit card needed

Share

Written by

The Teyro Team

Learning Team at Teyro

We build Teyro — an AI-powered learning platform that turns skill-building into a daily habit through bite-sized, gamified lessons. We write about the learning science and study strategies that shape our product.

More from The Teyro Team

On this page

  • Direct answer
  • A table
  • Core commands
  • Read everything
  • Pick columns and filter
  • Sort
  • Summarise
  • Combine two tables
  • Change data
  • Where SQL is used
  • Different database systems
  • Next steps
  • Where Teyro fits
  • The bottom line
  • More SQL guides

Keep reading

Skill Building & Careers

Best Careers for 2027: High-Demand Jobs and the Skills to Get Them

The best careers for 2027 and the jobs most in demand, based on BLS and World Economic Forum data, plus the skills each path needs.

Oct 30, 20263 min read
Skill Building & Careers

Best Certifications for 2027: Tech, Data, Cloud and Business

The best certifications for 2027 in cloud, security, data, project management and AI, who each one suits, and when a portfolio matters more.

Oct 30, 20263 min read
Skill Building & Careers

Best Programming Language to Learn in 2027 (for Your Goal)

The best programming language to learn in 2027 depends on what you want to build. Compare Python, JavaScript, TypeScript, SQL and C.

Oct 30, 20263 min read