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 are the several kinds of the update operations on relations? Also explain the constraints on these update operation. Give instance in support of your answer. There are th

how to submit answers softcopy

What are uncommitted modifications? The immediate-modification technique permits database modifications to be output to the database whereas the transaction is still in the act

What is the use of group by clause? Group by clause is used to be relevant aggregate functions to a set of tuples. The attributes given in the group by clause are used to shape

The Transactions- A transaction is definite as the unit of work in a database system. Database systems that deal with a huge number of transactions are also termed as transaction p

Illustrate the statement 'Projection operation distributes over the union operation'. Give an example.    Ans: Π L (E 1 ∪ E 2 ) = (Π L (E 1 )) ∪ (Π L (E 2 ))   This says th

These are designed to reduce the effects of a database failure and make sure a database is restored to a consistent state if a failure does arise. Manual backup/restore utilities n

Consider the following six relation schemes and their corresponding sets of functional dependencies. In each case identify a. All the candidate keys b. The highest normal for

Explain the Object-oriented decomposition Object-oriented decomposition targets at identifying individual sovereign objects that encapsulate both a state and certain behavio

Design a gennalization and specialization hierarchy for an automobile sales company