what is the difference between group and having
give an example with query and sample output
Answer Posted / manub22
- GROUP BY clause works on the rows returned by a SELECT Query. This clause summaries identical rows into a single/distinct group and returns a single row with the summary for each group, by using appropriate Aggregate function in the SELECT list, like COUNT(), SUM(), MIN(), MAX(), AVG(), etc.
- HAVING clause works as a Filter on top of the Grouped rows returned by the Query containing the GROUP BY clause. This clause cannot be replaced by a WHERE clause and vice-versa.
Check the difference b/w GROUP BY & HAVING, link: http://sqlwithmanoj.com/2015/05/23/sql-basics-difference-between-where-group-by-and-having-clause/
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is sql server? : Sql server database administration
Which are the two editions in which SQL Azure database available?
How to change the ownership of a schema in ms sql server?
What is the difference between clustered and non-clustered indexes in ms sql server?
Explain in brief about Microsoft SQL server?
State the difference between union and union all?
What are types of subqueries?
What do you know about normalization and de- normalization?
What is indexed view?
Explain full-text indexing?
Define right outer join in sql server joins?
How many joins in sql server?
How can we use ConnectorJ JDBC Driver with MS SQL?
mention different types of relationships in the dbms?
Explain about system database?