Learn SQL and Databases the Easy Way
Plain-English guides to SQL, SQL Server performance, database design, data analysis and Delphi, written by a developer who works with databases every day. No jargon, lots of real examples.
Where Do You Want to Start?
New to SQL
Write your first queries and learn to filter, sort and summarise data.
Designing a Database
Build tables that keep your data clean, consistent and easy to query.
Going Further
Speed up queries, protect your data and write smarter SQL.
My Queries Are Slow
Find out why SQL Server is slow and fix it step by step.
Delphi + SQL Server
Build fast business apps in Delphi that work with SQL Server.
SQL for Data Analysis
Clean, summarise and report on your data with SQL.
Latest Articles
- Funnel Analysis in SQL: Find Where Users Drop Off (Step by Step)
Build a conversion funnel in SQL: count users per step, enforce step order, calculate drop-off with LAG, add a conversion window and compare mobile vs desktop. - Many-to-Many Relationships in SQL: Junction Tables Explained Simply
How to store many-to-many relationships in SQL with a junction table: composite keys, foreign keys, indexes, queries and the comma-list mistake. - Delphi Procedures, Functions and Units Explained Simply
Split Delphi code into procedures, functions and units: value, const, var and out parameters, default parameters, overloads and the unit structure. - How to Connect Delphi to SQL Server with FireDAC (Step by Step)
Connect Delphi to SQL Server with FireDAC: TFDConnection settings, Windows vs SQL login, connecting in code, the ADO alternative and common errors. - EXISTS vs IN vs JOIN in SQL: Which One Should You Use?
The same question answered with EXISTS, IN and JOIN: when each one is right, why JOIN can duplicate rows, the NOT IN NULL trap, and what really matters for speed. - SQL for Data Analysis: A Step-by-Step Roadmap
What to learn, in what order, to use SQL for real data analysis: 9 stages with free tutorials, an 8-week study plan and a first portfolio project. - Aging Report in SQL Server: Group Unpaid Invoices into 0-30, 31-60, 61-90 and 90+ Days
Build an accounts receivable aging report in SQL Server step by step: open amount per invoice, days overdue, aging buckets per customer, totals, and common mistakes. - Basic Statistics in SQL: Average, Median, Percentiles and Standard Deviation
Calculate averages, medians, percentiles, mode and standard deviation in SQL Server and MySQL, find outliers, and learn which number to report. - SQL SELF JOIN Explained Simply (With Employee and Manager Examples)
What a SQL self join is and how to write one: show each employee with their manager, keep the top of the hierarchy with LEFT JOIN, compare related rows, find pairs and duplicates, and build a full org chart with a recursive CTE.