SQL for Testers
SQL tutorials for testers: SELECT, joins, DDL and DML, subqueries, transactions and test data checks.
SQL Window Functions: ROW_NUMBER, RANK, LAG/LEAD, NTILE and Frame Clauses
SQL window functions with examples: ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD, NTILE, PERCENT_RANK, FIRST/LAST_VALUE and ROWS vs RANGE frames.
SQL CTEs and Recursive CTEs: WITH Clause Explained with Examples
Common Table Expressions in SQL: WITH syntax, chaining CTEs, CTE vs subquery vs temp table, and recursive CTEs for hierarchies and date series.
SQL String Functions: CONCAT, SUBSTRING, REPLACE, TRIM and String Problems
SQL string functions with examples, plus common string problems: validating emails, extracting domains, cleaning phone numbers, parsing and formatting names.
SQL Date Functions and Date Edge Cases: Working Days, Month-End, Fiscal Year, Time Zones
SQL date functions with examples, plus the edge cases interviewers ask: working days, last day of month, fiscal years, and time zones (TIMESTAMP vs DATETIME).
SQL NULL Handling: COALESCE, IFNULL, NULLIF, NOT IN Traps and COUNT(*)
How SQL handles NULL: IS NULL, COALESCE, IFNULL, NULLIF, numeric functions, and the traps behind wrong results: NOT IN with NULLs, COUNT(*) vs COUNT(col).
SQL CASE WHEN, UNION vs UNION ALL and Pivot Queries
SQL CASE WHEN with examples (categories, conditional counts), UNION vs UNION ALL, and pivoting rows into columns with CASE inside aggregate functions.
Semi-Joins and Anti-Joins in SQL: EXISTS, NOT EXISTS, IN, ANY and ALL
Semi-joins and anti-joins in SQL: EXISTS vs IN vs JOIN, NOT EXISTS vs NOT IN vs LEFT JOIN IS NULL, ANY and ALL, and a decision tree for choosing.
SQL Query Anti-Patterns: Non-Sargable Queries, N+1, Cartesian Joins and SELECT *
SQL anti-patterns that slow queries or break results: non-sargable predicates, the N+1 problem, Cartesian explosions, SELECT * and reading EXPLAIN plans.
SQL UPSERT, MERGE, LATERAL Joins and Materialized Views
UPSERT in MySQL and PostgreSQL, MERGE in SQL Server and Oracle, LATERAL joins and CROSS APPLY for top-N per row, and materialized views with refresh strategies.
SQL for Data Warehousing: SCD Types 1, 2, 3, Star vs Snowflake Schema, ROLLUP and CUBE
Data warehouse SQL: slowly changing dimensions (SCD Type 1, 2, 3), OLTP vs OLAP, star vs snowflake schema, and ROLLUP, CUBE and GROUPING SETS.
SQL for Data Analytics: KPI, Retention, Cohort and Funnel Queries
Analytics SQL with examples: KPI queries, day-1 and day-7 retention, cohort analysis, conversion funnels, and monthly active users (MAU).
SQL Gaps and Islands: Consecutive Days, Streaks and Missing Values
Solve SQL gaps and islands problems: consecutive login streaks with the ROW_NUMBER trick, missing IDs and dates in a sequence, and longest winning streaks.
SQL Practice Projects: E-Commerce, Banking and Social Media Databases with Queries
Three SQL practice projects with schemas and real queries: an e-commerce store, a banking system and a social media app, for portfolio and interview practice.
DDL Commands in SQL: CREATE, ALTER, DROP, TRUNCATE and RENAME (with Examples)
DDL commands in SQL with examples: CREATE, ALTER, DROP, TRUNCATE and RENAME, DDL vs DML vs DCL vs TCL, and why TRUNCATE can't be rolled back.
Scenario-Based SQL Questions for Testers (With Sample Answers)
Real-world SQL scenarios for QA — verifying inserts, UI vs DB validation, user-wise bug counts, foreign key checks, and manual database testing, with answers.
SQL Performance & Optimization: Query Tuning and Indexing
Learn SQL performance tuning — SQL query optimization, how indexing helps, analyzing slow queries with EXPLAIN, and database testing tools — for QA and SDET.
Common SQL Queries for Testers (Bug Counts, Test Cases & More)
Practical SQL queries for QA — count bugs in the last 7 days, find users who didn't log in, fetch test cases by module, and count bugs per developer.
Advanced SQL Concepts: Views, Indexes, Normalization, Procedures
Advanced SQL for testers: views vs tables, indexes, normalization (1NF–3NF), stored procedures, triggers and functions — with examples run on MariaDB.
SQL INSERT, UPDATE, DELETE, Transactions & ACID Explained
Learn SQL data modification — INSERT, UPDATE, DELETE with WHERE, transactions, COMMIT and ROLLBACK, and ACID properties — with clear examples.
SQL Subqueries Explained: Correlated, Nth-Highest Salary & More
Learn SQL subqueries — correlated vs non-correlated, finding the second/nth highest salary, above-average queries, and ORDER BY in subqueries.
SQL Aggregate Functions & Grouping: COUNT, SUM, GROUP BY, HAVING
Learn SQL aggregate functions — COUNT, SUM, AVG, MIN, MAX — plus GROUP BY, HAVING, and WHERE vs HAVING, with clear examples for testers.
SQL Joins Explained: INNER, LEFT, RIGHT, FULL (With Examples for Testers)
SQL joins with examples: INNER, LEFT, RIGHT and FULL JOIN, LEFT vs RIGHT JOIN, finding matching and missing records, and FULL JOIN in MySQL.
SQL SELECT & Filtering: DISTINCT, LIKE, IN, BETWEEN & NULL
Learn to filter data in SQL — SELECT, DISTINCT, LIKE wildcards, IN, BETWEEN, IS NULL vs = NULL, and aliases — with clear examples for testers.
Basic SQL Commands: DDL, DML, DCL & TCL with Examples (For Testers)
Basic SQL commands with examples: DDL, DML, DCL and TCL, DELETE vs TRUNCATE vs DROP, keys and constraints, plus the queries testers use most.