Grokking SQL for Tech Interviews
Vote

0% completed

​

Nested Query vs SubQuery

Nested queries and subqueries are terms often used interchangeably but have subtle distinctions.

Subqueries

A subquery is a query embedded within another query, often enclosed in parentheses. It's a way to break down a complex query into simpler, more manageable parts. For example,

SELECT student_name FROM students WHERE student_id IN (SELECT student_id FROM exam_results WHERE score > 90);

In this example, the subquery (SELECT student_id FROM exam_results WHERE score > 90) is embedded within the larger query.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content