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
Enumerate or state the steps in creating a relevant database of a shop.

Assignment #1 Data Management The questions on this exam are based on the Baxter Aviation case scenario. 1. (5 points) The systems analyst proposes the following two relationshi

Data Manipulation Language Data manipulation language (DML) describes a set of commands that are used to query and change data within existing schema objects. In this case comm

This assignment is worth 45% of your final grade for this module.  Marks will be awarded as follows: Prototypes (wireframe and web based prototype) You are expected

What is conceptual schema? The schemas at the view level are known as subschema that describe dissimilar views of the database.

Question: (a) Prepare an ERD for the scenario given below. (b) Convert the ER diagram produced in (a) above into its physical design. You have to choose an appropriate Pri

entity relationship diagram for online examination system

What are the advantages of Logical Databases? It offers a simple-to-use selection screens.  You can change the pre-generated selection screen to your needs.  It offers check f

The Transactions- A transaction is definite as the unit of work in a database system. Database systems that deal with a huge number of transactions are also termed as transaction p

Table Handling  In RDBMS more than one table can be tackled at a time by using join operation. Join operation is a relational operation that causes 2 tables with a common domai