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
Explain Derived and Non-Derived Attribute? In few cases, two or more attribute values are related, for instance, Age and BirthDate attributes of a person. For specific person e

The database depicted in the Visio diagram describes Proceeding , Article , Researcher , article PublishedIn a proceeding, article WrittenBy researchers and proceedings Edi

Describe Interfaces for the DBA? Interfaces for the DBA - Most database systems holds privileged commands which could be used only through the DBA's staff. These involves com

Explain differance between Primary and secondary storage ? Primary and secondary storage Computer storage is classified within primary(main) memory and secondary(per

What is substitutability? Any method of a class-say A can equally well be adjured with any object belonging to any subclasses B of A. This characteristic leads to code reuse, a

What is meant by object-oriented data model? The object-oriented paradigm is based on encapsulation of data and code related to an object in to a one unit, whose contents are n


I want to fragment existing table using java code... help me..!!

Given the following relations TRAIN (NAME, START, DEST) TICKET (PNRNO., START, DEST, FARE) PASSENGER (NAME, ADDRESS, PNRNO.) Write SQL expressions for the following queries: No

Fragmentation: It is definite as partitioning of a relation into various fragments.Every fragment can be stored at a dissimilar site.