|
INTERVIEW QUESTIONS
DATABASE
SQL SERVER
DETAILS
Question: Give some examples of Analytical functions?
Answer: Analytical Function:-
return the infornation that about the relative possition of record (ROW_NUMBER,Rank,DENSE_RANK) and allow to campare with succesor and precedessors when they sort in spacific order.
select ename, deptno, sal, hiredate, row_number() over ( partition by deptno order by sal desc, comm desc , hiredate desc ) sal_rank_in_dept, row_number() over (order by sal desc) sal_rank_overall from emp order by deptno , sal desc , comm desc , hiredate desc
|
|
|
Category |
SQL Server Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 6709 users |
Added on |
4/3/2013 |
Views |
72143 |
Rate it! |
|
|
Question:
Give some examples of Analytical functions?
Answer:
Analytical Function:-
return the infornation that about the relative possition of record (ROW_NUMBER,Rank,DENSE_RANK) and allow to campare with succesor and precedessors when they sort in spacific order.
select ename, deptno, sal, hiredate, row_number() over ( partition by deptno order by sal desc, comm desc , hiredate desc ) sal_rank_in_dept, row_number() over (order by sal desc) sal_rank_overall from emp order by deptno , sal desc , comm desc , hiredate desc Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is the difference between "translate" and "replace"?
|
View Answer
|
|
How functional dependency is related to database table design?
|
View Answer
|
|
What is DYNAMIC SQL method ?
|
View Answer
|
|
What is the query used to display all tables names in SQL Server (Query analyzer)?
|
View Answer
|
|
What is the query used to display all tables names in SQL Server (Query analyzer)?
|
View Answer
|
|
What is a dirty page and dirty report?
|
View Answer
|
|
What are the new enhancements in SQL server 2005?
|
View Answer
|
|
Difference between a "where" clause and a "having" clause?
|
View Answer
|
|
Write sql query for retrieving employee names from employee table who are having salary greater than 5000 without using where clause?
|
View Answer
|
|
Explain real time situation where you would use clustered and Non-clustered Indexes?
|
View Answer
|
|
What is the pivot operator in MS SQL Server2005? What is the use of it and how do we use it
|
View Answer
|
|
What are "HINTS"? What is "index covering" of a query?
|
View Answer
|
|
What are data objects?
|
View Answer
|
|
What is the difference between User Identification and Authentication?
|
View Answer
|
|
How to display the table data in XML format using SQL Server.
|
View Answer
|
|
What is XMLA in SQL Server 2005
|
View Answer
|
|
How many types of system privileges are there, Can we add or delete privileges?
|
View Answer
|
|
Write a SQL Stored Procedure to create a GUID and add it to a table. Make that GUID an OUTPUT of that Procedure
|
View Answer
|
|
Can we generate a trigger for two tables? if so what is the query to generate a trigger for two tables employee table and department table with employee having department no.
|
View Answer
|
|
I was asked in an interview... "Suppose u have a field with UNIQUE KEY. can u leave two or more cells NULL in SQL Server 2005...If Yes then Why...if NOT then Why.....
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All SQL Server Interview Questions & Answers - Exam Mode /
Learning Mode
|