In SQL a Subquery can be simply defined as a query within another query. In other words we can say that a Subquery is a query that is embedded in WHERE clause of another SQL query.this same concept can be used in Laravel framework .where clause that compares the results of a subquery to return value