On this page
A SQL developer works mostly with databases: writing queries, building and changing tables, making reports and keeping data correct. The role is common in banks, retail, health and software firms, and SQL is the first thing nearly all data interviews test. This guide gives a clear route to job-ready SQL.
WHERE, ORDER BY, LIMIT, NULL.
INNER, LEFT and the problem of duplicated rows.
Totals, counts and filtering groups.
Break a big question into steps.
Rank, running totals, latest row per key.
Read a plan and make a slow query faster.
What the work looks like
You write queries for reports, fix wrong numbers, add columns or tables when the business changes, and make slow queries faster. You also write scripts that load data. You talk to analysts and developers about what a number means. Accuracy matters a lot, because people make decisions from your output.
Learn SQL in this order
- Basics. SELECT, WHERE, ORDER BY, LIMIT. Start with SQL for beginners.
- NULL. Learn the rules early. See SQL NULL explained.
- Joins. See SQL joins explained, and learn to spot duplicated rows after a join.
- GROUP BY. See GROUP BY explained.
- Subqueries and CTEs. See subquery vs CTE.
- Window functions. See window function interview questions.
- Design. Keys, normalisation and constraints. See primary key vs foreign key and normalization.
- Performance. Indexes, query plans and why a full table scan is slow.
How to practise
Solve problems daily on SQL practice. After each query, check it: count the rows, look for NULLs, and look for duplicates. Explain in words what each line does. Then try the same question a second way, for example with a CTE and with a subquery. The habit of checking your own result is what separates a developer from a beginner.
Questions interviews repeat
- Find the second highest salary.
- Remove duplicate rows and keep one.
- Top N per group using a window function.
- The difference between WHERE and HAVING.
- INNER JOIN vs LEFT JOIN, with an example of when rows disappear.
- What is an index, and when can it make a query slower?
The SQL interview questions for data engineers guide has these with worked answers.
A project to show
Design a small database for a library, a shop or a school: five or six tables with keys and constraints. Fill it with sample data, and write ten queries that answer real questions. Add two indexes and show a query that gets faster, with before and after timings. Put the schema, data script and queries on GitHub with a README.
Where to look
Search for SQL developer, database developer, junior data analyst, reporting analyst and data engineer trainee. Many analyst and engineer roles are mostly SQL, so your skill matches more posts than the title suggests. Check the database named in each post, such as MySQL, PostgreSQL, SQL Server or Oracle. The core ideas are the same, and small syntax differences can be learned in days.
Where to start today
Open a SQL practice problem, solve it, then check your answer for duplicate rows and NULLs before you look at any solution.