Skip to content
Advertisement

Getting total from query of individual groups

I’ running a query that returns total count of offices per county.

and my results look like this:

Is there a way to get the total count returned in the same query?

Advertisement

Answer

If you want it as a column, use a window function:

If you want it as an additional row, then use WITH ROLLUP:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement