Group by clauses-data manipulation language, Database Management System

Assignment Help:

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.

 


Related Discussions:- Group by clauses-data manipulation language

Draw an e-r diagram and convert it to a relational schema, In an organizati...

In an organization several projects are undertaken. Each project can employ one or more employees. Each employee can work on one or more projects. Each project is undertaken on the

What is called mirroring, What is called mirroring? The simplest approa...

What is called mirroring? The simplest approach to introducing redundancy is to duplicate each disk. This method is called mirroring or shadowing.

What is the meaning of data independence, What is the meaning of Data indep...

What is the meaning of Data independence? Data independence means a programs that are not dependent on the physical attributes of data and a programs that are not dependent on

Explain concept of inheritance with support of example, Explain concept of ...

Explain concept of inheritance with support of suitable example. Inheritance Inheritance is one of milestone of object-oriented programming language as it allows a creati

Explain alternate key, Explain Alternate key? Alternate Key - All the...

Explain Alternate key? Alternate Key - All the candidate keys except primary key are known as alternate keys.

Database tables design and test queries, Load sample data into the database...

Load sample data into the database tables design and test queries to return the following information • All rows and columns for employees • All rows and columns for customers •

The data of a view is not physically stored, The data of a view is not phys...

The data of a view is not physically stored, but derived from one or more tables. True the data of a view is not physically stored

Give an example of operations from the state actions, Give an example of op...

Give an example of operations from the State Actions and Activities. For instance, in bank the activity verify account code and verify password

Relational database, Convert the following ER - diagram (Entity Relationsh...

Convert the following ER - diagram (Entity Relationship Diagram) into a relational database (the primary keys are underlined): 2160_Convert the following ER - diagram into a

Extended star schema, Northwind Pty Ltd sells a variety of food products th...

Northwind Pty Ltd sells a variety of food products throughout the world. They want to use the reporting features of SAP''s Business Information Warehouse to better understand thei

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd