Skip to content

SQL practice focused on QA Automation: data validation, data-quality checks, and realistic back-end testing scenarios using PostgreSQL.

Notifications You must be signed in to change notification settings

GTWB/qa_automation_SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧩 SQL – Phase 1: Foundations

This section covers the fundamental SQL operations used daily by QA Engineers to validate, query, and inspect backend data.
All queries were executed on the qa_testing database using PostgreSQL.


🎯 Learning Goals

  • Retrieve and filter data using SELECT and WHERE
  • Sort and limit results with ORDER BY and LIMIT
  • Apply text and range filters with LIKE, BETWEEN, and IN
  • Combine multiple conditions using AND, OR, and NOT
  • Practice real QA-style data checks (email validation, recent orders, product sanity, etc.)

🧱 Topics Covered

Concept Description Example
SELECT Retrieve data from one or more columns. SELECT name, city FROM users;
WHERE Filter rows matching specific conditions. WHERE city = 'London';
ORDER BY Sort results ascending or descending. ORDER BY signup_date DESC;
LIMIT Restrict the number of rows returned. LIMIT 5;
LIKE / BETWEEN / IN Pattern, range, and list filters. WHERE price BETWEEN 50 AND 200;
AND / OR / NOT Combine or negate conditions. WHERE city='London' AND price>100;

🧩 SQL – Phase 2: Aggregations & Grouping

This section covers the SQL techniques used to summarise data, perform calculations, and generate QA-style analytical reports.
All queries were executed on the qa_testing database using PostgreSQL.


🎯 Learning Goals

  • Count rows and compute totals using COUNT(), SUM(), AVG(), MIN(), MAX()
  • Group data using GROUP BY
  • Filter aggregated groups using HAVING
  • Build conditional summaries using CASE WHEN
  • Produce QA reporting outputs (test summaries, orders per user, city distributions)

🧱 Topics Covered

Concept Description Example
COUNT() / SUM() / AVG() Compute totals and averages. SELECT COUNT(*) FROM test_results;
MIN() / MAX() Get smallest / largest values. SELECT MAX(order_date) FROM orders;
GROUP BY Aggregate rows into groups. GROUP BY city
HAVING Filter groups based on aggregated conditions. HAVING COUNT(*) >= 2
Conditional Aggregation (CASE) Create per-status or per-condition summaries. SUM(CASE WHEN status='passed' THEN 1 END)

🧱 Tech Stack

  • Database: PostgreSQL (qa_testing schema)
  • Client: pgAdmin 4 / psql
  • Editor: VS Code

To create the schema locally:

-- Run this file in your PostgreSQL instance:
qa_testing_schema.sql

About

SQL practice focused on QA Automation: data validation, data-quality checks, and realistic back-end testing scenarios using PostgreSQL.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published