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

Develop a team database, I need a professional to prepare a database to co...

I need a professional to prepare a database to collect and store basic information. The information can be basic info such as contact details etc. One requirement i have is f

Case study, what problems are raised by the database? why is it so controve...

what problems are raised by the database? why is it so controversial? why is data quality an issue?

Where does view definition stored, Where does view definition stored? ...

Where does view definition stored? A view definition is permanently stored as part of the database.

What is called bit-level striping, Normal 0 false false fal...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

On laod, how to write a in a text and load it on mysql

how to write a in a text and load it on mysql

Explain transaction, What is transaction? Collections of operations tha...

What is transaction? Collections of operations that form a single logical unit of work are known as transactions.

Explain the function of object model, Explain the function of Object model ...

Explain the function of Object model Object model describes the classes of objects in system, including their attributes and operations which they support. The analysis object

Explain difference between volatile, Explain the difference between the thr...

Explain the difference between the three storage types - volatile, non volatile and stable.             Ans: Volatile storage: if storage media loses data while power goes off,

What is equi join, What is equi join? Equi Join - It generates all th...

What is equi join? Equi Join - It generates all the combinations of tuples from two relations which satisfy a join condition along with only equality comparison (=).

Example of relational operations, Consider the relation PERSON. If you want...

Consider the relation PERSON. If you want to display details of persons having age less than or equal to 30 than the select operation will be used as follows: σ AGE The resu

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