Wednesday, March 2, 2016

NTILE In Oracle

Hi friends today we will discuss about NTILE in Oracle:

Syntax:

   SELECT NTILE(NUMBER) OVER (ORDER BY <COLUMN>) FROM TABLE;

Example:

  SELECT ename, sal, NTILE(2) OVER (ORDER BY sal asc) AS quartile
  FROM EMP
  ORDER BY ename, sal, quartile;

o/p:

 
empname sal quartile
11raj 5000 2
ADAMS 1100 1
ALLEN 1600 2
BLAKE 2850 2
CLARK 2450 2
FORD 3000 2
JAMES 950 1
JONES 2975 2
MARTIN 1250 1
MILLER 1300 1
SCOTT 3000 2
SMITH 800 1
TURNER 1500 1
WARD 1250 1

Power Function In Oracle

Hi friends today we will discuss about power function in oracle:
The syntax:
select   power(number,number) from dual;

example:

 select power(3,2) from dual;

o/p:
9

Thank u

Read data from csv in R Programming

Read a data set from csv file.. x <- read.csv(file.choose(),header=TRUE) here x is the R data set vaiable.