Single Row sub queries
Definition
A single-row subquery is a nested query that returns exactly one row and one column, allowing it to be used with single-row comparison operators like =, >, or <.
Example
SELECT name, salary FROM employees
WHERE salary > (SELECT AVG(salary) FROM employees);
Why Testers Use Them
Single-row subqueries let testers write comparison-based verification queries — for instance, checking that a specific record's value is correctly above or below a computed benchmark like an average.
Ready to master real-world software testing?
Learn manual and automation testing hands-on with mentor-led sessions.
.png)