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 responsibility of File manager? File Manager : Manager allocation of space on disk storage and the data structures used to represent within stored on disk. It is a

Replication : It is definite as a copy of a relation. Every replica is stored at a dissimilar site. The alternative to replication is to store only single copy of a relation which

Define decision tree classifiers? As the name suggests decision tree classifiers use a tree: Every leaf node has an associated class, and every internal node has a predicate as

Determine the Strong and Weak Entity Based on the method of foreign key, there might be arise a situation when we have to relate an entity having a primary key of its own and a

What are the differences among MySQL_fetch_array(), MySQL_fetch_object(), MySQL_fetch_row()? Mysql_fetch_object returns the result from the database like objects while mysql

Question: (a) Why is it important to know the architecture rather than to start requirement capture when designing a large scale system? (b) Who are the different people in

In Database software have only pure security or some dis secured by administrator?

can you resolve this for me please? Database Management Systems Homework 1 The following relations are given (primary keys are underlined): PLAY-ACTOR(AId, Name, Nationality, Birt

1. Determine the set of minimal functional dependencies for the following data. The local bakery, Happy Cakes, needs your help designing a database that will support a kiosk in

The basic merits of decomposition. The Advantages of Decomposition 1.  Separate person can work on each subsystem. 2.  A particular software engineer can specialize in a