adplus-dvertising
frame-decoration

Question

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 tuples in the specified sort order is

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.

ALL OF the mentioned

d.

NONE OF the mentioned

Posted under DBMS

Answer: (a).SELECT YEAR, avg(num credits)
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. The functions which construct histograms and use buckets for ranking is

Q. The command ________________ such tables are available only within the transaction executing the query, and are dropped when the transaction finishes.

Q. OLAP stands for

Q. Data that can be modeled as dimension attributes and measure attributes are called _______ data.

Q. The generalization of cross-tab which is represented visually is ____________ which is also called as data cube.

Q. The process of viewing the cross-tab (Single dimensional) with a fixed value of one attribute is

Q. The operation of moving from finer-granularity data to a coarser granularity (by means of aggregation) is called a ________

Q. In SQL the cross-tabs are created using

Q. { (item name, color, clothes size), (item name, color), (item name, clothes size), (color, clothes size), (item name), (color), (clothes size), () }

This can be achieved by using which of the following ?

Q. What do data warehouses support?

Q. Which one of the following is the right syntax for DECODE ?

Q. Which of these query will display the the table given below ?

Q. Select * from employee where employee_id>1009;

Which of the following employee_id will be displayed?

Q. Consider the two relations instructor and department. Which of the following is used to create view for these relations together?

Q. Which of the following is used to provide privilege to only a particular attribute ?

Q. Which of the following statement is used to remove the privilege from the user Amir ?

Q. Which of the following is used to provide delete authorization to instructor ?

Q. Which of the following is true regarding views ?

Q. If we wish to grant a privilege and to allow the recipient to pass the privilege on to other users, we append the __________ clause to the appropriate grant command.

Q. In authorization graph if DBA provides authorization to u1 which in turn gives to u2 which of the following is correct ?