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
Define Signal. It allows methods to respond to events triggered by themselves or by other processes. Each signal corresponds to an exacting event. A signal is represented in Sy

Recovery Techniques: After Reading the types of failures and database errors, let us talk about how to recover from the failures. Recovery can be complete using/restoring the previ

Define tuple variable? Tuple variables are used for comparing two tuples in the same relation. The tuple variables are explained in the from clause by way of the as clause.

What is the main goal of RAID technology? Describe the levels 1 through 5. RAID stands for Redundant Array of Inexpensive (or sometimes "Independent")Disks. RAID is a met

Data Independence This brings us to our next topic: data independence. It is the property of the database which tries to make sure that if we make any change in any level of sc


What do you mean through integrity constraints? Integrity Constraints -An integrity constraint is a condition specified on a database schema and restricts the data in which

How Relational Calculus is different from Relational Algebra? What do understand by TRC queries and DRC queries?  Ans: Relational calculus contain two calculi, the tuple relati

Differance between procedural and non procedural DML? Procedural and non procedural DML Procedural DML exactly what data is require and how to obtain those data. Non procedural

Define Direct file organization? The direct file organization is employed to enhance the performance in accessing the records than sequential file organization. In direct file