Getting Started with SQL

Your First SELECT in Kotomarket

6 min

The most important query

QUERY opens the archive console in front of you—an amber window glowing in the darkness of the compartment. Behind it, the Kotomarket database sits silent: customers, products, orders, and behavioral events, all frozen since 2024. The clue at the end of the was clear: start with SELECT.

A lot of SQL work begins with one simple action: reading data. That's what SELECT does. You ask the database a question, and it answers with data: “show me what you've got.”

We'll start with the storefront and look at the products table. The query below asks the database to “return every column (*) from the products table, but no more than 5 rows.” Here, LIMIT n sets the maximum number of rows the database will return. We're getting ahead of ourselves a little—we'll cover it properly, along with sorting, in Chapter 2. Click Run, and the first rows of the storefront, dormant for 160 years, will come alive on the holopanel. Then change 5 to 10 and run the query again to see how the result size changes.

QUERY: Go ahead and run it. SELECT only reads data—you can't damage the archive with a read query. I've checked. Many times.

A holographic product table comes to life above the archive console after the first SELECT
The first SELECT wakes the storefront: five rows from products rise out of the darkness onto the holopanel.
SELECT * FROM products LIMIT 5;
Practice: write the query
Five rows were enough to check the table. Now return the entire products table: every column and every row, with no limit on the number of rows.
Column names and their order are not checked — the values are compared.
SELECT
FROM products;
Check yourself
What does the SELECT keyword do?