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
- What Is Apache Spark? A Simple Guide for SQL Users (With Examples)
What Apache Spark is, why it replaced Hadoop MapReduce, how it compares with SQL Server and MySQL, and a real PySpark example that runs the same GROUP BY you already know, plus Parquet, partitioning and when you actually need Spark. - Lookup Combo Boxes in Delphi: Choose a Customer or Item From a List
Let users pick a customer or item by name while the database stores the ID: TDBLookupComboBox, lookup fields in a DBGrid, search dialogs and common traps. - How to Find and Fix Slow Queries in Laravel (Debugbar, EXPLAIN, Indexes)
How to find slow queries in a Laravel app with Debugbar, Telescope, DB::listen and the MySQL slow query log, read EXPLAIN, and fix N+1 queries, whereDate/whereYear scans, missing indexes and slow pagination. - Build a Customer Screen in Delphi in 30 Minutes (SQL Server Step by Step)
Build a complete customer maintenance screen in Delphi for SQL Server: grid, edit fields, search, defaults, validation and friendly errors, mostly with no code. - Why Is My Stored Procedure Slow? How to Find and Fix It in SQL Server
How to find the one slow statement inside a SQL Server stored procedure, and fix the eight usual causes: parameter sniffing, catch-all queries, loops, scalar functions, table variables, implicit conversions, local variables and waits. - Gaps and Islands in SQL: Find Missing Numbers, Streaks and Status Runs
Gaps and islands in SQL: find missing invoice numbers with LEAD, consecutive ranges and login streaks with the ROW_NUMBER trick, runs of the same status with LAG and a running SUM, and missing dates with a calendar. - Delphi vs C# vs Web Apps for Business Software: Which Should You Use?
Delphi, C# (.NET) or a web app for ERP and business software? A fair side-by-side comparison, the same task in all three, and a simple guide to choose. - SQL Server Query Timeouts: Find the Real Cause (and Stop the Damage)
Why “Execution Timeout Expired” comes from the application, not SQL Server: how to find timed-out queries in Query Store and Extended Events, the five usual causes, and why SET XACT_ABORT ON matters. - How to Find and Delete Duplicate Rows in SQL (Keep One Copy)
How to find duplicate rows in SQL with GROUP BY and HAVING, see the full rows behind them, keep one copy with ROW_NUMBER, delete the rest safely in SQL Server and MySQL, and stop duplicates coming back.