SQL showed up in many of the backend, software and graduate adverts we read, whether the employer used PostgreSQL, MySQL or SQL Server. It is also useful in data, product and support roles, so time spent here pays off widely. The good news is that a small set of commands covers most daily work.
Tables, rows and columns
Imagine a table called sales for Hawa's provisions shop:
| id | item | qty | price_pesewas | sold_on | |----|-------|-----|---------------|------------| | 1 | rice | 2 | 3000 | 2026-10-01 | | 2 | oil | 1 | 4500 | 2026-10-01 | | 3 | sugar | 3 | 1200 | 2026-10-02 |
Each row is one sale. Each column is one detail. Prices are stored in pesewas to avoid rounding errors, and dates are written year first so they sort correctly.
Reading data with SELECT
SELECT item, qty FROM sales;Add WHERE to filter and ORDER BY to sort:
SELECT * FROM sales
WHERE qty >= 2
ORDER BY sold_on DESC;