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
Illustrate the view of software architecture A model is a semantically closed abstraction of system composes of elements. It can be visualized using any of the following five v

When every condition appears with equality condition (=) only. c)   Natural join (denoted by R*S) When two join attributes have the similar name in both relations. (Tha

Secondary Indexes Let consider the student database and its clustering index and primary (only one will be applicable at a time). Now consider the state when the database is to

Problem 1 Why are the operational system keys not recommended for forming data warehouse primary keys? Give any two examples 2 Explain the following performance tuning techn

Describe the shadow paging technique.

Explain the rules for creating a labelled precedence graph for testing view serializability.            Ans: A schedule S is view serializable if it is view equivalent to a ser

Ask question #MinimThe Georgia Tech Library (GTL) has approximately 16,000 members, 100,000 titles, and 250,000 volumes (an average of 2.5 copies per book). About 10 percent of the

Use of partial data by applications : In common, applications work with views rather than whole relations. Thus, it may be more appropriate to work with subsets of relations rather

What is the function of a Domain? A domain defines the technical settings of a table field. A domain describes a value range, which sets the permissible data values for the

how the string works as keyword?