All fields

“Subqueries” in Information Technology

16 questions across 1 technology.

Information Technology

16 questions in 1 technology

#QuestionTechnologyTopicLevel
1What are common mistakes developers make when writing subqueries that can lead to incorrect results or poor performance? SQL Server › SubqueriesSQL ServerSubqueriesIntermediate
2What is a subquery in SQL Server, and how is it typically used within a larger query? SQL Server › SubqueriesSQL ServerSubqueriesBeginner
3What is the difference between a correlated and a non correlated subquery? SQL Server › SubqueriesSQL ServerSubqueriesBeginner
4What is the difference between using EXISTS and IN when checking for the presence of related data with a subquery? SQL Server › SubqueriesSQL ServerSubqueriesIntermediate
5How do you use a subquery within the SELECT list to calculate a related aggregate value alongside each row of the outer query? SQL Server › SubqueriesSQL ServerSubqueriesIntermediate
6How would you rewrite a slow correlated subquery as an equivalent, potentially faster JOIN based query? SQL Server › SubqueriesSQL ServerSubqueriesAdvanced
7How does the SQL Server query optimizer typically handle and potentially transform a subquery internally when generating an execution plan? SQL Server › SubqueriesSQL ServerSubqueriesAdvanced
8What is a common table expression, and why would you use one instead of a subquery? SQL Server › Common Table Expressions (CTEs)SQL ServerCommon Table Expressions (CTEs)Beginner
9How do you define multiple common table expressions within a single query? SQL Server › Common Table Expressions (CTEs)SQL ServerCommon Table Expressions (CTEs)Beginner
10What is the difference between a LEFT JOIN and a RIGHT JOIN? SQL Server › JoinsSQL ServerJoinsBeginner
11What is the difference between the JSON_VALUE and JSON_QUERY functions? SQL Server › JSON Support in SQL ServerSQL ServerJSON Support in SQL ServerBeginner
12How do you filter the results of a grouped query based on an aggregated value, such as only showing customers who spent more than a certain amount? SQL Server › Aggregate Functions & GROUP BYSQL ServerAggregate Functions & GROUP BYIntermediate
13What is a recursive common table expression, and what kind of problems is it commonly used to solve? SQL Server › Common Table Expressions (CTEs)SQL ServerCommon Table Expressions (CTEs)Intermediate
14How do you find rows that exist in one table but have no matching row in another table using a join? SQL Server › JoinsSQL ServerJoinsIntermediate
15How do you convert a JSON array stored in a column into a relational table format that can be queried like normal rows? SQL Server › JSON Support in SQL ServerSQL ServerJSON Support in SQL ServerIntermediate
16Can a common table expression be used inside an UPDATE, DELETE, or MERGE statement, and how does that work? SQL Server › Common Table Expressions (CTEs)SQL ServerCommon Table Expressions (CTEs)Advanced