How do I add a subtotal to the query?

Row totals and column totals are available by navigating to the field’s column header in the query, and clicking on the vertical three-dot menu icon that appears when you hover over the header or by right clicking then selecting Subtotal.