o‘zing o‘rgan
SQL Basics Lesson 1 / 55
Filbek

What is a database?

Tables, rows, columns and your first query

Chapter 1. First queries 15 minutes Video SQL 3 questions

A database is an organised store of data. The most common kind is relational: data lives in tables, like in Excel.

  • Table — one topic: students, courses, payments
  • Column — a property: name, age, score
  • Row — one record: one student

SQL (Structured Query Language) is the language for asking a database questions. A question is called a query.

All lessons use one table — talabalar ("students", 10 rows). It is ready in the editor every time. Table and column names are in Uzbek: ism = first name, familiya = last name, guruh = group, viloyat = region, yosh = age, ball = score.

Your first query

SELECT * FROM talabalar;

SELECT — "choose", * — "all columns", FROM talabalar — "from the students table". Result:

id ism familiya guruh viloyat yosh ball
1 Aziz Karimov 25-407 Toshkent 19 88
2 Malika Yusupova 25-407 Samarqand 18 95
3 Jasur Rahimov 25-408 Buxoro 20 72
4 Dilnoza Tosheva 25-408 Toshkent 19 81
5 Bekzod Aliyev 25-407 Farg'ona 21 64
6 Nilufar Saidova 25-409 Namangan 18 90
7 Sardor Qodirov 25-409 Xorazm 20 57
8 Gulnora Ergasheva 25-408 Andijon 19 77
9 Otabek Nazarov 25-409 Toshkent 22 69
10 Zarina Mirzayeva 25-407 Qashqadaryo 18 84

💡 SQL keywords are not case-sensitive: select works too. Writing them in CAPITALS is a convention — easier to read. The ; at the end means "the query ends here".

Video lesson

Practice SQL

Run the query in the editor to see all data in the talabalar table. Then press "Check".

query.sql Ctrl+Enter — run
Write your SQL query and press "Run".
Show solution
SELECT * FROM talabalar;

Check yourself

Question 1 / 3

What does one row in a table represent?

Choices

Question 2 / 3

What does * mean in SELECT *?

Choices

Question 3 / 3

What is SQL used for?

Choices