This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “Windowing”.
1. Which of the following is a set function?
a) RANK
b) NTILE
c) Window
d) All of the mentioned
View Answer
Explanation: The word ‘window’ is used to refer to the set of rows that the function works on.
2. Point out the correct statement.
a) Windowing functions were added to the standard SQL:2003
b) Windowing functions were added to the standard SQL:2008
c) Windowing functions were added to the standard SQL:2012
d) Windowing functions were added to the standard SQL:2014
View Answer
Explanation: Windowing functions were added to the standard SQL:2003 that is managed by the ISO and it was specified in more detail in SQL:2008.
3. Windowing function was added in which of the following versions of SQL Server?
a) 2003
b) 2005
c) 2008
d) None of the mentioned
View Answer
Explanation: SQL Server has had only a partial implementation up to now, but it has come up in SQL 2012.
4. Which is the most important benefit of window function?
a) Aggregation
b) Association
c) Generalization
d) All of the mentioned
View Answer
Explanation: Most important benefit of window functions is that we can access the detail of the rows from an aggregation.
5. Point out the wrong statement related to window function.
a) They are used to provide details of a backup plans
b) They are used to provide details of an aggregation
c) They are used to provide details of an aggregation
d) None of the mentioned
View Answer
Explanation: Window functions belong to a type of function known as a ‘set function.
6. Which of the function is not a ranking window function?
a) RANK
b) NTILE
c) ROW_NUMBER
d) None of the mentioned
View Answer
Explanation: Since SQL Server 2005 we have had support for some window functions, they are: ROW_NUMBER, RANK, DENSE_RANK and NTILE.
7. Which of the following is not a type of window function?
a) Ranking window function
b) Associate window function
c) Analytic window functions
d) All of the mentioned
View Answer
Explanation: There is an aggregate window function available in SQL Server.
8. How many types of window functions are present in SQL Server?
a) 3
b) 4
c) 5
d) 6
View Answer
Explanation: Window functions are distinguished by the presence of an OVER() clause and come in three varieties.
9. Which of the following function is an analytic window function?
a) LAG
b) LEAD
c) FIRST_VALUE
d) None of the mentioned
View Answer
Explanation: There are 8 analytic window functions in SQL Server 2012.
10. LAST_VALUE comes in the category of _____________
a) Ranking window function
b) Associate window function
c) Analytic window functions
d) All of the mentioned
View Answer
Explanation: The analytic window functions are new for SQL Server 2012.
Sanfoundry Global Education & Learning Series – SQL Server.
To practice all areas of SQL Server, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Check SQL Server Books
- Check Information Technology Books
- Apply for Programming Internship
- Practice Programming MCQs