Question
a.
SELECT YEAR, avg(num credits)
OVER (ORDER BY YEAR ROWS 3 preceding) AS avg total credits
FROM tot credits;
b.
SELECT YEAR, avg(num credits)
OVER (ORDER BY YEAR ROWS 3 unbounded preceding) AS avg total credits
FROM tot credits;
c.
SELECT YEAR, MIN(num credits)
OVER (ORDER BY YEAR ROWS 3 unbounded preceding) AS avg total credits
FROM tot credits;
d.
SELECT YEAR, SUM(num credits)
OVER (ORDER BY YEAR ROWS 3 unbounded preceding) AS avg total credits
FROM tot credits;
Posted under SQL Server
OVER (ORDER BY YEAR ROWS 3 preceding) AS avg total credits
FROM tot credits;
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Suppose we are given a view tot credits (year, num credits) giving the total number of credits taken by students in each year.The query that computes averages over the 3 preceding...
Similar Questions
Discover Related MCQs
Q. Which server can join the indexes when only multiple indexes combined can cover the query?
View solution
Q. Select ________ dept_name from instructor;
Here which of the following displays the unique values of the column?
View solution
Q. To delete a database ___________ command is used.
View solution
Q. Which is a duplicate copy of a file program that is stored on a different storage media than the original location?
View solution
Q. _______________ joins are SQL server default.
View solution
Q. To alter a database ___________ command is used.
View solution
Q. The EXISTS keyword will be true if ____________
View solution
Q. Which of the following is an aggregate function?
View solution
Q. Which is the duplication of computer operations and routine backups to combat any unforeseen problems?
View solution
Q. The UNION SQL clause can be used with ____________
View solution
Q. Find all the tuples having temperature greater than ‘Paris’.
View solution
Q. Which of the following is not a class of constraint in SQL Server?
View solution
Q. Point out the correct statement.
View solution
Q. Which of the following constraint does not enforce uniqueness?
View solution
Q. Constraints can be applied on ___________
View solution
Q. Point out the wrong statement.
View solution
Q. Purpose of foreign key constraint in SQL Server is __________
View solution
Q. Which of the following is not a foreign key constraint?
View solution
Q. Which of the following foreign key constraint specifies that the deletion fails with an error?
View solution
Q. How many types of constraints are present in SQL Server?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond SQL Server? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!