GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 135 of 151    Print  
Analytical functions
What are analytical functions and how are they used?


  
Total Answers and Comments: 1 Last Update: July 22, 2008     Asked by: Hsingh85 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 22, 2008 02:31:08   #1  
singh.neerajin Member Since: May 2008   Contribution: 4    

RE: Analytical functions
Analytic functions compute an aggregate value based on a group of rows. They differ from aggregate functions in that they return multiple rows for each group. The group of rows is called a window and is defined by the analytic_clause.

for example:

SQL> select deptno,
  2  ename,
  3  sal,
  4  sum(sal) over (partition by deptno
  5  order by sal,ename) CumDeptTot,
  6  sum(sal) over (partition by deptno) SalByDept,
  7  sum(sal) over (order by deptno, sal) CumTot,
  8  sum(sal) over () TotSal
  9  from emp
10  order by deptno, sal;


over by clause, order by clause,partition ny clause comes under anyalytical clause.....
check below.
select ... analytic-function (...) over (partition by ...) .. select ... analytic-function (...) over (order by ...) .. select ... analytic-function (...) over (partition by ... order by ...) .. 

 
Is this answer useful? Yes | No

 Related Questions

Plz clarryfy this.Scinario is whether we can use out mode in functions?.I thought it's not possible. But in interview they are asking this.if i am telling no,they are not accepting me.Plz clarify this anyone.
Read Answers (9) | Asked by : George Suresh

What is the Scalar Data type in PL/SQL?what is the forward decleration in packages?what is the usage of IN,OUT,INOUT parameters in Procedures or functions?
Read Answers (5) | Asked by : chiranjeevi reddy

How to query to know, that dbms_rowid package contains ROWID_OBJECT, rowid_block_number ,etc procedures or functions in it.

Latest Answer : A table function is a function that returns an entire set of rows, and can be queried directly from the within a SQL statement, as if it were true database table. Whereas pipeline function is similar, but returns the data as it is constructed rather than ...
Read Answers (1) | Asked by : navneet

What are analytical functions and how are they used? 
Latest Answer : Analytic functions compute an aggregate value based on a group of rows. They differ from aggregate functions in that they return multiple rows for each group. The group of rows is called a window and is defined by the analytic_clause.for example:SQL> ...
Read Answers (1) | Asked by : Hsingh85

How to return more than one row through functions? Explain with example. 
Latest Answer : Eg: SELECT empname,sal        FROM    employee_table       WHERE salMIN(sal);Hope the above statement executes. ...


 Sponsored Links

 
Related Articles

Microsoft AJAX Library - Anonymous Functions

Anonymous Functions Anonymous functions can be created adhoc and used instead of a named function Although this can hinder readability when the function is more complex you can do this if you don t intend to reuse a function s code In the following example we pass such an anonymous function to Displ
 

Microsoft AJAX Library - Functions as Variables

Functions as Variables In JavaScript functions are first class objects This means that a function is regarded as a data type whose values can be saved in local variables passed as parameters and so on For example when defining a function you can assign it to a variable and then call the function thr
 

Microsoft AJAX Library - JavaScript Functions

JavaScript Functions A simple fact that was highlighted in the previous chapter but that is often overlooked is key to understanding how objects in JavaScript work code that doesn t belong to a function is executed when it s read by the JavaScript interpreter while code that belongs to a function is
 

ERPAdvantages for Management Functions

ERP Advantages for Management Functions ERP management systems provide a technology platform in which organizations can integrate and coordinate their main internal business processes They use this to fight against the problem of the organizational inefficiency brought on by the use of different sys
 

C++ Static Functions

C Static Functions Static member functions have a class scope and they do not have access to the this pointer of the class When a member is declared as static a static member of class it has only one data for the entire class even though there are many objects created for the class The main usage of
 

C++ Virtual Functions

C Virtual Functions What are Virtual Functions Virtual as the name implies is something that exists in effect but not in reality The concept of virtual function is the same as a function but it does not really exist although it appears in needed places in a program The object oriented programming la
 

C++ Inline Functions

C Inline Functions In this C tutorial you will learn about Inline function what is inline function reason for the need of inline function what happens when an inline function is written general format of inline function explained with example mosgoogle center What is Inline Function Inline functions
 

On-Line Analytical Processing

On-Line Analytical Processing On-Line Analytical Processing is a processing that supports the analysis of business trends and projections. It is also known as decision support processing and OLAP.  An OLAP software enables companies to have real-time analysis of data stored in a database. A
 

String handling functions

What is the string handling functions present in header file <string.h>? There are number of string handling functions present in string.h. In other words if a programmer uses any of the function present in string.h then they must include the header file as #include <string.h&am
 

SQL Functions

SQL Programming Overview In the article SQL Programming, we discussed creating the “Hello, World!” function in PostgreSQL, MySQL, and Oracle. In this article, we take “Hello, World!” one step farther and introduce the parts of a function and how to pass parame
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape