SQL guides

Explanations that lead to a query.

Every guide includes a verified example, common mistakes to avoid and a practical next step.

A barrier refuses an invalid value, a capsule secures two operations and a sensor archives a change

Constraints, transactions or triggers: which tool to choose?

These three tools protect data at different times. Confusing them adds complexity without improving reliability.

Read the article
Two counters compare all lines to the cells actually filled in

COUNT(*) or COUNT(column)?

The difference seems small, but it can change a completeness or volume KPI.

Read the article
An analyst uses an individual spreadsheet linked by a bridge to a database shared by several collaborators

Excel or database: how to choose?

The right choice does not depend on a duel between tools, but on the way in which your data lives and is shared.

Read the article
Three visual mechanisms filter a list, an interval and a pattern SQL

IN, BETWEEN and LIKE: which filter to choose?

Three apparently similar operators respond to three different business intentions.

Read the article
Scattered files and sheets transform into four connected and coherent relational tables

Why does SQL exist?

SQL does not start with SELECT. It begins when multiple people and systems need to share reliable facts.

Read the article
A central base linked to structure, paperwork, security, automation and performance

SQL beyond SELECT: create, modify, secure and automate

A database is not only used to return lines: it structures and protects the functioning of entire applications.

Read the article
The SQL language passes a query to a data engine which produces a result

SQL and database: what's the difference?

SQL is a language; A database is the system that stores information and executes queries.

Read the article
A common data language splits into multiple paths to distinctly shaped base engines

SQL, PostgreSQL, MySQL and SQL Server: what are the differences?

SQL is the common language; PostgreSQL, MySQL and SQL Server are engines with their own dialects and tools.

Read the article
Rows are filtered before grouping then the groups pass a second threshold

WHERE or HAVING: where to place your filter?

WHERE defines the calculation lines; HAVING decides which calculated groups remain visible.

Read the article
A SQL transformation compares successive steps to a nested structure

CTE or subquery: how to choose?

Both structure a query; the best form is the one that makes the business steps testable.

Read the article
A data flow separates simple deduplication from compute-based aggregation

DISTINCT or GROUP BY: how to remove repetitions?

Both can return a row per value, but their intent is not the same.

Read the article
A parent row expands to multiple legitimate child rows after join

Why does a join create duplicates?

join does not always create an error: it often reveals a poorly anticipated one-to-many relationship.

Read the article
Two joins compare matches and left lines without equivalent

INNER JOIN or LEFT JOIN: which one to choose?

The choice depends first on which lines should remain visible, not on a syntax preference.

Read the article
Order lines produce two distinct indicators of sales and margin

Calculate a revenue and a margin in SQL

A high revenue does not guarantee a high margin: the two indicators must be defined separately.

Read the article
SQL query using CASE WHEN to classify rows of data

CASE WHEN to SQL: create business categories

Transform a business rule into a readable column without modifying the source data.

Read the article
A value is compared to a collection then verified by an existence signal

IN or EXISTS: which writing to use?

The choice becomes simple when you distinguish membership in a list and the existence of a relationship.

Read the article
SQL editor showing how to handle missing values in a table

NULL and COALESCE in SQL: handle missing values

Handle missing values explicitly to produce reliable filters, calculations and reports.

Read the article
Illustration of customer tables and orders linked to form a common result

INNER JOIN to SQL: link customers and orders

Connect two tables without duplicating data with a clear and verifiable join condition.

Read the article
Illustration of data lines grouped and then transformed into visual indicators

GROUP BY and HAVING: building KPIs in SQL

Transform sales lines into reliable indicators by city, category or period.

Read the article
Abstract illustration of data tables linked to a query SQL

SQL: understand SELECT, FROM and WHERE

Just three keywords are enough to start turning a table into a useful answer.

Read the article