Skip to main content
Practice

What is SQL?

SQL stands for Structured Query Language. It's a programming language used to communicate with and manage data stored in databases.


Why Should You Learn SQL?

Whether you're a data analyst, software developer, or just working with data, SQL is the universal tool for accessing and manipulating data.

With SQL, you can:

  • Retrieve specific data from large datasets
  • Insert, update, or delete records
  • Create and manage database structures (tables, views, indexes)

A Quick History

SQL was first developed in the 1970s by IBM researchers and later standardized by ANSI.

It became the foundation of many popular relational database systems like:

  • MySQL
  • PostgreSQL
  • SQLite
  • Oracle Database
  • Microsoft SQL Server

What Does SQL Look Like?

Assume you have a table called users with the following columns:

idnameemailage
1Alicejohn@example.com15
2Bobjane@example.com30
3Charliecharlie@example.com25

Here's a simple SQL query that gets data from a table:

Basic SQL SELECT Query
SELECT name, age
FROM users
WHERE age > 20;

This means:

  • Get the name and age columns
  • From the users table
  • Where the user's age is greater than 20

The result will be:

nameage
Bob30
Charlie25

Simply put, SQL is a language used to store large amounts of data in a spreadsheet-like format, similar to Excel, and to retrieve that data based on specific conditions.


Real-World Use Cases

SQL is widely used across industries, for example:

  • A marketing team checks customer activity from a sales database.
  • A web app fetches user data from a backend database.
  • A data scientist prepares and filters data before modeling.

Mastering SQL can open up a lot of career opportunities and help you build a strong foundation in the data field.


Coding Practice

Try running this SQL query in the code editor:

Select id, name, and email columns
SELECT id, name, email
FROM students;

This will select the id, name, and email columns from the students table.

You'll see every row and column in the table—like viewing a spreadsheet.