All fields

“SQL Queries” in Information Technology

35 questions across 5 technologies.

Information Technology

35 questions in 5 technologies

#QuestionTechnologyTopicLevel
1How do you configure and use raw SQL queries alongside LINQ in EF Core when a complex query is difficult or inefficient to express in LINQ? .NET › Entity Framework Core & Data Access.NETEntity Framework Core & Data AccessIntermediate
2How should a team decide between using an ORM like Eloquent or Doctrine versus writing raw SQL queries directly for a specific, particularly complex or performance sensitive part of an application? PHP › Eloquent ORM & Doctrine ORMPHPEloquent ORM & Doctrine ORMAdvanced
3What is a subquery in SQL Server, and how is it typically used within a larger query? SQL Server › SubqueriesSQL ServerSubqueriesBeginner
4How does Sequelize define models and relationships for a relational (SQL) database in Node.js? Node.js › Databases & ORMs (MongoDB/Mongoose, SQL/Sequelize)Node.jsDatabases & ORMs (MongoDB/Mongoose, SQL/Sequelize)Intermediate
5How do you create an Extended Events session to capture specific long running queries on a production server? SQL Server › SQL Server Profiler & Extended EventsSQL ServerSQL Server Profiler & Extended EventsIntermediate
6What are common mistakes developers make when writing subqueries that can lead to incorrect results or poor performance? SQL Server › SubqueriesSQL ServerSubqueriesIntermediate
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 an index in SQL Server, and how does it help speed up queries? SQL Server › IndexesSQL ServerIndexesBeginner
9What is a user defined function in SQL Server, and why would you create one instead of repeating the same logic in multiple queries? SQL Server › User Defined FunctionsSQL ServerUser Defined FunctionsBeginner
10How does SQL Server compile and cache execution plans for stored procedures, and how does this affect performance compared to ad hoc queries? SQL Server › Stored Procedures & FunctionsSQL ServerStored Procedures & FunctionsAdvanced
11What is SQL injection, and how does using parameterized queries in Node.js prevent it? Node.js › DatabasesNode.jsDatabasesIntermediate
12What is the difference between the JSON_VALUE and JSON_QUERY functions? SQL Server › JSON Support in SQL ServerSQL ServerJSON Support in SQL ServerBeginner
13How 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
14How do you view the top resource consuming queries captured by Query Store? SQL Server › Query StoreSQL ServerQuery StoreBeginner
15What is the difference between a correlated and a non correlated subquery? SQL Server › SubqueriesSQL ServerSubqueriesBeginner
16What tools or queries can you use to monitor the health and effectiveness of a columnstore index over time? SQL Server › Columnstore IndexesSQL ServerColumnstore IndexesIntermediate
17What is the difference between using EXISTS and IN when checking for the presence of related data with a subquery? SQL Server › SubqueriesSQL ServerSubqueriesIntermediate
18How 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
19How would you diagnose and resolve a blocking problem where many queries are waiting on a single long running transaction? SQL Server › Isolation & LockingSQL ServerIsolation & LockingAdvanced
20How would you rewrite a slow correlated subquery as an equivalent, potentially faster JOIN based query? SQL Server › SubqueriesSQL ServerSubqueriesAdvanced
21How would you read a deadlock graph to identify the exact queries and resources that caused a specific deadlock? SQL Server › DeadlocksSQL ServerDeadlocksAdvanced
22What is an indexed view, and how can it improve the performance of complex, frequently run queries? SQL Server › ViewsSQL ServerViewsIntermediate
23What are the differences in how a hash index and a memory optimized nonclustered index handle range queries and equality lookups? SQL Server › Hash Indexes & Hash Join OperationsSQL ServerHash Indexes & Hash Join OperationsIntermediate
24What 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
25How do you define multiple common table expressions within a single query? SQL Server › Common Table Expressions (CTEs)SQL ServerCommon Table Expressions (CTEs)Beginner
26What is the difference between a LEFT JOIN and a RIGHT JOIN? SQL Server › JoinsSQL ServerJoinsBeginner
27How 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
28What 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
29How do you find rows that exist in one table but have no matching row in another table using a join? SQL Server › JoinsSQL ServerJoinsIntermediate
30Can 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
31What is the difference between IEnumerable<T>, IQueryable<T>, and List<T>, and how does choosing the wrong one hurt performance against a database? C# › LINQC#LINQIntermediate
32What is database normalization, and what specific problems can over-normalization or under-normalization cause? Node.js › DatabasesNode.jsDatabasesIntermediate
33What is the difference between a one-to-many and a many-to-many relationship in a relational database, and how is each modeled? Node.js › DatabasesNode.jsDatabasesIntermediate
34What are the most important Entity Framework Core best practices for building performant, reliable data access code? .NET › Entity Framework Core & Data Access.NETEntity Framework Core & Data AccessAdvanced
35What is database indexing, and how does an index improve query performance in a Node.js application's database layer? Node.js › DatabasesNode.jsDatabasesAdvanced