Download resume

Projects / PRJ-07

Learning

SQL practice for testers

27 SQL questions with solutions from a tester’s point of view: checking data after a test, finding duplicates, orphans and bad records.

27 queries
27SQL questions with solutions
5tables in the schema

Topics covered

  • Basics: SELECT, WHERE, ORDER BY, LIMIT, BETWEEN, LIKE, IS NULL
  • Aggregates: COUNT, SUM, AVG, MIN, MAX, GROUP BY, HAVING
  • Joins: INNER JOIN, LEFT JOIN, joining three tables
  • Subqueries and CASE: NOT IN, second highest value, status percentage
  • Tester checks: duplicates, missing values, invalid emails, orphan records, negative stock, order total vs item total, business rule violations

Setup

Five tables (users, products, orders, order_items, defects) with small sample data and a few bad records planted on purpose. Every query’s result is saved from a SQLite run. Learning repo; the data is made up.