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
I need help with data warehousing and business intelligence course project about designing a data warehouse for a jewelry company that does not have one

What is the use of rename operation? Rename operation is used to rename both relations and an attributes. It uses the as clause, taking the form: Old-name as new-name.

what is Nested relational model? Explain with examples.

what do you mean by consistency in rdbms?

What are the uses of the information in the Data dictionary? The following information is directly taken from the Data dictionary: Information on fields displayed with

What is Candidate Key Super Key or Candidate Key: It is such an attribute of a table that can uniquely recognize a row in a table. Generally they have unique values and can n

The dataset " CFOLYMPICS.XLS " contains the observations used in the above article.  The definitions of the variables are also included in this spreadsheet.  However, for the purpo

Find the names of all Albums that have more than 30 tracks. Result: (name: varchar(255))

Illustrate the term- Abstracting Out Common Behaviour Inheritance is not every time recognised during analysis phase of development, thus it is necessary to re-evaluate object

Differance between Open addressing and chaining for collision resolution ? In open addressing , proceeding from the occupied position specified by hash address the program che