90.3k views
5 votes
The following SQL statement contains what type of subqueries? SELECT isbn, title FROM books WHERE pubid = (SELECT pubid FROM books WHERE title = 'SHORTEST POEMS') AND retail-cost > (SELECT AVG(retail-cost) FROM books);

User Gawkface
by
6.7k points

1 Answer

6 votes

Answer:

Nested SQL Subquery

Step-by-step explanation:

There are three types of SQL subquery

inline view, Nested Subquery and Scalar Subquery

The Nested SQL Subqueries are queries that appears in the WHERE clause of the SQL statement, as appeared in the above question.

A subquery can be nested inside other subqueries and that is one of the abilities of SQL.

Once this query is placed in the WHERE clause, then it's called a Nested SQL subquery

User Kurt Pattyn
by
7.2k points