What is the purpose of Ratio_To_Report Function of Oracle?

 Posted by Niladri.Biswas on 5/17/2013 | Category: Oracle Interview questions | Views: 1733 | Points: 40
Answer:

It is an analytical function that computes the ratio of a value over the total set of values.RATIO_TO_REPORT of 5 over (1,2,3,4,5,6,7,8,9,10) is (5/55) i.e. 0.09090909090909090909090909090909

e.g

SQL> Select EmpName,Salary,Ratio_to_Report(SALARY) Over() As RatioReportExample

2 From tblEmployee
3 Where DeptId = 1;

EMPNAME SALARY RATIOREPORTEXAMPLE
-------------------------------------------------- ---------- ------------------
Arina Biswas 6000 .146305779
Jitesh Mallik 16000 .390148744
Deepak Singh 6890 .168007803
Shashi Bhushan 5120 .124847598
Atithi Salonki 7000 .170690076


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response