|
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 8452 users |
Added on |
7/25/2011 |
Views |
67352 |
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.
|
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
|