Applies a condition to groups produced by GROUP BY, often on an aggregate such as SUM(). WHERE works earlier, on individual rows before they are grouped.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains HAVING in context, with comparison tables and the common traps.
Terms in this definition
- GROUP BY
Collapses rows sharing the same values of chosen expressions into one row per bucket, with aggregate functions evaluated for each bucket. Writing
GROUP BY ALLpicks every expression in the select list that isn't an aggregate. - SUM
Totals every numeric value held in one column. Where each row needs its own expression evaluated first, SUMX is needed.
- WHERE
Limits a SELECT, UPDATE or DELETE to just the rows meeting a condition. Omit it, and the statement hits every row.
- EARLIER
Within nested DAX row contexts, lets an inner calculation read a column as it stood in an outer pass; EARLIEST jumps to the outermost. Most people now use variables, which read more clearly.
Related terms
- Active-active
A VPN gateway set-up where traffic flows through both instances simultaneously, each having a separate tunnel and public IP. Servicing one instance therefore disrupts connections less than under default active-standby.
- Client-side labelling
Automatic labelling defined inside a sensitivity label, which suggests or applies it in Office apps such as Outlook and Word as people work, with the user having the final say. Labelling done by the service relies on auto-labelling policies instead.
- Co-authoring for files with sensitivity labels
A Purview option allowing multiple people to work on label-encrypted files simultaneously in the Office desktop apps, rather than having to check the files out.
- Direct copy
Loading a Fabric warehouse by having the Copy activity call the COPY statement straight against Parquet or delimited text files held in Azure Blob Storage or ADLS Gen2, with no intermediate step. If the format or settings aren't supported, staged copy has to be used instead.
- Emergency access account
A cloud-only, non-personal account that holds Global Administrator permanently and sits outside Conditional Access, reserved for situations where regular admins can't get in. Microsoft advises having two or more.
- Live connection
Power BI reports can skip having a local model and instead connect straight to one already published in the Power BI service, Azure Analysis Services or SQL Server Analysis Services. Authors may still write report-level measures; editing the underlying model is possible only after converting it via Make changes to this model.
- M2M
Lets automation call Azure Databricks by having a service principal swap its OAuth client ID and secret for short-lived access tokens, known as the client credentials flow; this machine-to-machine approach is the preferred one for unattended processes.
- Notice templates
Reusable emails in Insider Risk Management, each having its own sender, subject line and a plain-text or HTML body, for reminding whoever a case concerns.