23 questions for “Aggregate Functions & GROUP BY”

Found in 1 field. Select a question to see its full answer.

Information Technology

23 questions in 1 technology

#QuestionTechnologyTopicLevel
1How does the GROUP BY clause work together with aggregate functions? SQL Server › Aggregate Functions & GROUP BYSQL ServerAggregate Functions & GROUP BYBeginner
2How 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
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 are aggregate functions in SQL Server, and what are the most common ones? SQL Server › Aggregate Functions & GROUP BYSQL ServerAggregate Functions & GROUP BYBeginner
5How 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
6How do you correctly combine WHERE and HAVING in the same query to filter both individual rows and grouped results? SQL Server › Aggregate Functions & GROUP BYSQL ServerAggregate Functions & GROUP BYIntermediate
7What is the difference between COUNT(*), COUNT(1), and COUNT(column_name) in SQL Server? SQL Server › Aggregate Functions & GROUP BYSQL ServerAggregate Functions & GROUP BYIntermediate
8What 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
9How 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
10How 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