SQA Tools Blog

Learn testing and automation, one article at a time

Free tutorials, solved practice problems and interview prep for QA and automation engineers: Python, Playwright, Selenium, SQL, Git and more.

1,677Articles
1,141Solved Python problems
7Topics
100%Free

SQL articles

61 articles · page 1 of 6 · Clear filters
SQL

SQL Window Functions

Learn SQL window functions step by step: OVER(), PARTITION BY, ORDER BY in the window, aggregates without GROUP BY, named windows and frames, in MySQL 8.4.

9 min readRead →
SQL

MySQL Users and Roles

Manage MySQL accounts: CREATE USER, user@host, passwords, ALTER and DROP USER, roles with CREATE ROLE and default roles, and least-privilege account design.

6 min readRead →
SQL

SQL UNION and UNION ALL

Combine query results with SQL UNION and UNION ALL: rules for columns, removing duplicates, sorting the combined result, and when UNION ALL is faster.

5 min readRead →
SQL

SQL Subqueries

Learn SQL subqueries step by step: scalar and IN subqueries, derived tables in FROM, subqueries in SELECT, and when a JOIN or CTE is better.

8 min readRead →
SQL

SQL Top N per Group

Get the top N rows per group in SQL: top earners per department, best-selling products per category, latest order per customer, with ties handled correctly.

7 min readRead →
SQL

SQL Running Totals and Moving Averages

Calculate running totals, cumulative counts, moving averages and percent of total in SQL with SUM() OVER, window frames ROWS and RANGE, in MySQL 8.

9 min readRead →
SQL

SQL Project: QA Test Results Tracker

A SQL project for QA engineers: pass rates per build, failing and flaky tests, regressions with LAG, slowest tests, automation coverage and defect metrics.

21 min readRead →
SQL

SQL ROW_NUMBER, RANK and DENSE_RANK

The difference between ROW_NUMBER, RANK and DENSE_RANK explained on real data with ties, plus NTILE, ranking per group and the Nth highest salary, in MySQL.

8 min readRead →
SQL

SQL Recursive CTE

Learn recursive CTEs in MySQL 8: WITH RECURSIVE, anchor and recursive parts, number and date series, employee hierarchies, org-chart paths and loop limits.

8 min readRead →
SQL

SQL Project: Library Management System

Build and query a library management database in MySQL: available copies, overdue loans, fines, popular books, members, a view and an issue-book procedure.

25 min readRead →
SQL

SQL Project: Banking Transactions

A banking SQL project in MySQL: reconcile balances, running-balance statements, fraud patterns with window frames, an ACID transfer procedure and a trigger.

27 min readRead →

Preparing for a QA interview?

Take free timed mock tests with answers and explanations.