Sub query « Table « SQL Server / T-SQL






1.Use aggregate function in sub-query
2.Subqueries: calculate an aggregate value on the fly and use it in the outer query for comparison