All fields

“Window Functions” in Information Technology

11 questions across 1 technology.

Information Technology

11 questions in 1 technology

#QuestionTechnologyTopicLevel
1How do LAG and LEAD window functions let you access values from a previous or following row without needing a self join? SQL Server › Window FunctionsSQL ServerWindow FunctionsIntermediate
2How would you use window functions together to build a comprehensive sales analytics report showing running totals, rankings, and period over period comparisons all in a single query? SQL Server › Window FunctionsSQL ServerWindow FunctionsAdvanced
3How would you calculate a running total or a percentage of total using aggregate functions combined with window functions? SQL Server › Aggregate Functions & GROUP BYSQL ServerAggregate Functions & GROUP BYAdvanced
4What is a window function in SQL Server, and how is it different from a regular aggregate function used with GROUP BY? SQL Server › Window FunctionsSQL ServerWindow FunctionsBeginner
5How does the PARTITION BY clause within a window function differ from GROUP BY, and why is this distinction useful? SQL Server › Window FunctionsSQL ServerWindow FunctionsIntermediate
6How does the ROWS versus RANGE frame specification within an OVER clause affect the result of a window function like a running total? SQL Server › Window FunctionsSQL ServerWindow FunctionsAdvanced
7What is the difference between RANK, DENSE_RANK, and ROW_NUMBER when there are tied values in the ordering column? SQL Server › Window FunctionsSQL ServerWindow FunctionsIntermediate
8What does the ROW_NUMBER function do, and what is a common practical use case for it? SQL Server › Window FunctionsSQL ServerWindow FunctionsBeginner
9How does the GROUP BY clause work together with aggregate functions? SQL Server › Aggregate Functions & GROUP BYSQL ServerAggregate Functions & GROUP BYBeginner
10How do the ROLLUP and CUBE extensions to GROUP BY help you generate subtotal and grand total rows in a single query? SQL Server › Aggregate Functions & GROUP BYSQL ServerAggregate Functions & GROUP BYAdvanced
11How would you use a CTE combined with a window function to identify and remove duplicate rows from a table? SQL Server › Common Table Expressions (CTEs)SQL ServerCommon Table Expressions (CTEs)Advanced