adspace


How do use Having,Group by,Group function in SQL?

Answer Posted / Rohit Kumar Chaudhary

The SQL functions `HAVING`, `GROUP BY`, and `GROUP` are used together to filter and group data in a query. Here's an example:n```sqlnSELECT department, COUNT(employee_id) AS total_employeesnFROM employeesnGROUP BY departmentnHAVING total_employees > 50;n``` In this example, the `GROUP BY` clause groups the data by department, and the `HAVING` clause filters the groups that have more than 50 employees.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain system functions or built-in functions? What are different types of system functions?

1070


Does view occupy space?

1031


What are wait types?

1261


Equi join and non equi join is possible with sql server?

1139


what is the Ticketing tool used in Wipro technologies at Bangalore...???

8237


Why use identity in sql server?

1209


How do I create a trace in sql server?

1126


How can we solve concurrency problems?

1129


What is subquery? Explain the properties of a subquery?

1070


Why and when do stored procedure recompile?

1075


do you know how to configure db2 side of the application? : Sql server database administration

1132


What is a scheduled job or what is a scheduled task?

1043


Explain “row_number()” in sql server with an example?

1086


What is sql or structured query language?

1232


What is the difference between for xml raw and for xml auto?

1125