Jignesh Trivedi12y agoPosted Apr 14, 2014, 8:54 AMHi,what exact you looking for Group by clause?Please refer below link it might help you.http://technet.microsoft.com/en-us/library/ms177673.aspx0
Munesh Sharma12y agoPosted Apr 14, 2014, 8:12 AMgo on this linkhttp://www.w3schools.com/sql/sql_groupby.asp0
Rajneesh Rai12y agoPosted Apr 14, 2014, 8:11 AMHello Vevek,Group By : Groups a selected set of rows into a set of summary rows by the values of one or more columns or expression.For example: consider the following simple example,CREATE TABLE EMPLOYEE(ID INT IDENTITY(1,1),NAME VARCHAR(50),DEPARTMENT VARCHAR(50))GOINSERT INTO EMPLOYEESELECT 'RAJNEESH RAI', 'IT'UNION ALLSELECT 'VIVEK','IT'UNION ALLSELECT 'SEEMA','HR'UNION ALLSELECT 'MELISSA','ADMIN'GO-- Now i want to get the number of employees in each department, for that i have to group all the employees by their department.SELECT DEPARTMENT,COUNT(NAME) FROM EMPLOYEE GROUP BY DEPARTMENTHope you got it :)For more details go through following links :1. http://www.w3schools.com/sql/sql_groupby.asp2. http://technet.microsoft.com/en-us/library/ms177673.aspx0
Abhay Shanker12y agoPosted Apr 14, 2014, 8:04 AMThe Group By Clause is used with collabration With Select Statement to arrang identical data in group.It follows where clause in select statement and preceds the order bySelect department, sum(sales) from order group by (department)0
Jignesh TrivediPosted Apr 14, 2014, 8:54 AM
Hi,
what exact you looking for Group by clause?
Please refer below link it might help you.
http://technet.microsoft.com/en-us/library/ms177673.aspx
Munesh SharmaPosted Apr 14, 2014, 8:12 AM
Rajneesh RaiPosted Apr 14, 2014, 8:11 AM
Group By : Groups a selected set of rows into a set of summary rows by the values of one or more columns or expression.
For example: consider the following simple example,
Hope you got it :)
For more details go through following links :
1. http://www.w3schools.com/sql/sql_groupby.asp
2. http://technet.microsoft.com/en-us/library/ms177673.aspx
Abhay ShankerPosted Apr 14, 2014, 8:04 AM
It follows where clause in select statement and preceds the order by
Select department, sum(sales) from order group by (department)