.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> C# >> Post New Question Subscribe to Interview Questions

What is Group By Clause

Posted By :Ashutosh Jha     Posted Date :August 31, 2014    Points :40   Category :C# 
Group By clause is used to group the rows, depending upon one or more values so that the group function can be applied to each group. if the 'Where' clause exists in the select statement, then Group By clause always be followed to the 'Where' clause. If in the select statement, there are non-aggregate columns, then in the Group By clause we need to add all those columns except the aggregate columns.


You can also find related Interview Question to What is Group By Clause  below: 

difference between having and group by clause ?

  
Having is basically used for the any condition in Group by Clause

like if you are finding sum,max,min etc of any field you are using group by clause and sum is required with some condition then you use having clause for that condition

like select sum(Amount) as Amount from AD_tblAmount having (Sum(Amount)>0) (More...)

Why can a "group by" or "order by" clause be expensive to process?

  
requires creation of Temporary tables to process the results of the query (More...)

What is the main purpose of having Conversation Group?

  
It's a way of grouping all the dialogs that are used for a particular task. All the dialogs associated with processing a particular order would be grouped into a single conversation group. The conversation group is implemented as a conversation group identifier, which is included with all messages in all dialogs contained in the conversation group. When a message is received from any of the dialogs in a conversation group, the conversation group is locked with a lock that is held by the receiving transaction. For the duration of the transaction, only the thread that holds the lock can receive messages from any of the dialogs in the conversation group. This makes our order entry application much easier to write because even though we use many threads for scalability, any particular order is only processed on one thread at a time. This means we don't have to make our application resilient to problems that are caused by the simultaneous processing of a single order on multiple threads. (More...)

What's a code group?

  
A code group is a set of assemblies that share a security context. (More...)

What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?

  
Having Clause is basically used only with the GROUP BY function in a query. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query (More...)

What is the difference between a HAVING CLAUSE and a WHERE CLAUSE ?

  
Both Clause are used to check the Condition at the time of Retrival of records in Database.
WHERE Clause is applied to each row before they are part of the GROUP BY function in a query.
Having Clause is basically used only with the GROUP BY function in a query. (More...)

What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?

  
Having Clause is basically used only with the GROUP BY function in a query. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query (More...)

What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?

  
Having Clause is basically used only with the GROUP BY function in a query.
WHERE Clause is applied to each row before they are part of the GROUP BY function in a query.
(More...)

Select the correct statement that sets the priority of a thread among a group of threads to maximum.

  
1, threadObj.getPriority(THREAD.MAX_PRIORITY);
2, threadObj.setPriority(MAX_PRIORITY);
3, threadObj.setPriority(THREAD.PRIORITY);
4, threadObj.setPriority(THREAD.MAX_PRIORITY);

Answer : 4 (More...)

Can we have order by clause in Sql Server View?

  
Inorder to have ORDER BY Clause in Sql Server

we have to restrict the rows by Using TOP clause

If there is no TOP Clause then you cannot have ORDER BY clause

in a View (More...)

Why LINQ is having select clause at the end?

  
Due to IntelliSense of Visual Studio.

If the select clause was in the first of LINQ, then the IDE cannot populate the properties inside the object.

Eg: from f in db.Forum where f.Id > 0 select f.Name;

If the select was in front - the "select f." could not populate any autocomplete properties or methods. (More...)

What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?

  
They specify a search condition for a group or an aggregate. But the difference is that HAVING can be used only with the SELECT statement. HAVING is typically used in a GROUP BY clause. When GROUP BY is not used, HAVING behaves like a WHERE clause. Having Clause is basically used only with the GROUP BY function in a query whereas WHERE Clause is applied to each row before they are part of the GROUP BY function in a query. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend