Group by clauses-data manipulation language, Database Management System

Group By clauses

 • It is used to group database tuples on the basis of definite common attribute value like as employees of a department.

  • WHERE clause still can be used, if required.

Example: Search department number and Number of Employees working in that department.

 SELECT DEPTNO, COUNT(EMPNO) FROM EMP

GROUP BY DEPTNO;

Please note that as using group by and aggregate functions the only attributes that can be put in select clause are the aggregated functions and the attributes that have been used for grouping the information. For instance, in the example 20, we cannot put ENAME attribute in the SELECT clause as it will not have a distinct value for the group. Please note the group here is formed on DEPTNO.

 

Posted Date: 3/11/2013 1:08:19 AM | Location : United States







Related Discussions:- Group by clauses-data manipulation language, Assignment Help, Ask Question on Group by clauses-data manipulation language, Get Answer, Expert's Help, Group by clauses-data manipulation language Discussions

Write discussion on Group by clauses-data manipulation language
Your posts are moderated
Related Questions
what is view?explain

Describe the iterative and incremental life cycle For an iterative and incremental life cycle, two criteria are process and time. The main components of showing a project devel

What are called journaling file systems? File systems that support log disks are known as journaling file systems.

What are two special events? The two special events are as "entry" and "exit". Any action which is marked as linked to entry event is executed whenever given state is entered v

1) Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a pict


Eliminate Columns Not Dependent On Key The Employee Relation satisfies - First normal form - As it has no repeating groups. Second normal form - As it do not have multi-a

What are the advantages of object oriented databases in comparison with others? Why it is still not widely used? Object oriented designs are coherent, efficient and less prone

what is stracture of dabms

List any two disadvantages of a database system ? The disadvantages of database system are: • Database systems are difficult, complex, and time-consuming to design. • Substanti