CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS DATABASE SQL SERVER DETAILS
Question :
Give some examples of Analytical functions?
Category SQL Server Interview Questions
Rating (0.0) By 0 users
Added on 4/3/2008
Views 527
Rate it!
Answers:

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





If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
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

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL SQL Server Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/14967/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.73