Aptitude (12) ASP.NET (2) Automata (4) Browser (1) C (5) C# (1) C++ (10) Code (3) CSS (1) Data Structure (1) DATABASE (3) HTML (1) java (43) JSP (1) math (1) MySql (8) other (6) php (3) Servlet (3)

Friday, 30 November 2012

Aggregate Functions:



 They are used to compute a single value from a set  of attribute values of a column:
   count :
            how many rows(tuples) are stored in the relation EMP
select count(*) from EMP;
            how many different job title  are stored in the relation EMP
select count(distinct job) from EMP;
max & min:
           select min(SAL),max(SAL) from EMP
           select max(SAL)- min(SAL)  from EMP
sum:
         select sum(SAL) from EMP
avg:





No comments:

Post a Comment