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
This project requires you to perform a systems analysis and then design a system solution using database software. Ace Auto Dealers specializes in selling new vehicles from Subaru.

Derived horizontal fragmentation: Some applications may include a join of two or more relations. If the relations are stored at dissimilar locations, there may be a major overhead

Give the general form of SQL query? Select  A1, A2............., An From  R1, R2..............., Rm Where  P

When It is better to use files than a DBMS? It is better to use files than a DBMS when Multiple users wish to access the data.

Representing complex relationship among data A database may contain varieties of data interrelated to each other in numerous ways. A DBMS must have the capability to represent

Consider the two relations given below Given that A is the primary key of R, D is the primary key of S and there is a referential integrity among S.A and R.A, discuss all

When a function module is activated syntax checking is performed automatically. YEs, a function module is activated syntax checking.

Question 1: Define the term business intelligence tools? Briefly explain how the data from one end gets transformed into information at the other end? Definition Exp

What is DataWarehousing? Subject-oriented, meaning that the data in the database is organized so that all the data elements relating to the similar real-world event or object

4. Describe three ways to handle missing field values