They&#x27;re useful for providing summaries like row totals and column totals. Rather than just get an aggregated count for the total GROUP, you can also get aggregated counts for each unique combination of columns within the GROUP.<p><pre><code>  col1 col2 count  
  ---- ---- -----  
  a    b    10  
  a    null 5  
  null b    5  
</code></pre>
There&#x27;s more to it than that obviously, but you can read about them here: <a href="http:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;devel&#x2F;static&#x2F;queries-table-expressions.html" rel="nofollow">http:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;devel&#x2F;static&#x2F;queries-table-ex...</a> (7.2.4. GROUPING SETS, CUBE, and ROLLUP)