# Database Discussions > MDX and Analysis Services >  GROUP BY and HAVING

## Teach

What is the relationship between aggeregate functions and the summarization clauses GROUP BY and HAVING and how are they used together to query data?

----------


## rmiao

You can find sample codes in 'SELECT Examples' in sql books online.

----------

