SQL Introduction and the Practice Database
SQL (Structured Query Language) is how you talk to a database. Almost every app - shops, banks, schools, hospitals - keeps its data in tables and uses SQL to read and change it.
Almost every app you use stores its data in a database: your bank transactions, your orders, your messages. SQL is the language used to ask those databases questions and change their data. It has been around for decades, works almost the same in MySQL, PostgreSQL, SQL Server, Oracle and SQLite, and is asked for in jobs from data analyst to back-end developer.
A table is like an Excel sheet: columns are the fields (name, city) and rows are the records (one customer per row).
Our practice shop
Every lesson uses the same small online-shop database with four tables:
customers- id, name, city, joinedproducts- id, name, category, price, stockorders- id, customer_id, order_date, statusorder_items- order_id, product_id, qty, price (what was in each order)
Press Try it yourself, then Run. The query runs on a real SQL database (SQLite) right in your browser. Change it and run again - nothing can break, the database starts fresh every time.
SELECT * FROM customers;
-- Result:
-- id | name | city | joined
-- ---+-------------+-----------+-----------
-- 1 | Asha Verma | Delhi | 2026-01-12
-- 2 | Ravi Kumar | Mumbai | 2026-02-03
-- 3 | Neha Singh | Pune | 2026-03-21
-- 4 | Arjun Mehta | Delhi | 2026-05-09
-- 5 | Fatima Khan | Hyderabad | 2026-07-15
-- 6 | Vikram Rao | NULL | 2026-09-30▶ Try it yourself* means "every column". SQL keywords are not case-sensitive (select works too), but writing them in CAPITALS makes queries easy to read. End each statement with a semicolon.Where SQL is used
- MySQL, PostgreSQL, SQL Server, Oracle and SQLite all use SQL. The basics you learn here work in all of them; only a few functions differ.
- Data analysts, testers, back-end developers and even marketing teams write SQL every day.
- It is asked in most IT interviews in India.
- A database keeps data in tables of rows and columns.
- SQL asks questions (queries) and changes data.
- The same SQL works across most databases.
