Skip to main content

Querying for Data Analyticss

Querying is writing SQL SELECT statements to retrieve and shape data from relational tables. It covers choosing columns, filtering and sorting rows, combining tables with joins and set operations, and summarising with aggregates and GROUP BY. It is the analyst's main tool on the Data Analytics path, since most business data sits in databases.

Stage: SQL · Part of the Data Analytics roadmap · Last reviewed 19 November 2026

What to learn in Querying

Querying interview questions

Why does a LEFT JOIN followed by a WHERE on the right table's column sometimes behave like an INNER JOIN?

Unmatched rows carry NULLs in the right table's columns, and a condition such as right.status = 'active' is not true for NULL, so those rows are removed. Moving the condition into the ON clause keeps the unmatched left rows.

What is the difference between COUNT(*) and COUNT(column)?

COUNT(*) counts every row in the group, while COUNT(column) counts only rows where that column is not NULL. COUNT(DISTINCT column) counts unique non-NULL values. The difference matters when measuring missing data or counting customers rather than orders.

Where Querying fits in the Data Analytics roadmap

Querying belongs to the SQL stage (beginner level), which takes about 8 hours. The analyst's main tool.

Back to the full Data Analytics roadmap