instruction: View count, raw, by Post Type.
response: SELECT CASE WHEN (GROUPING(pt.Name) = 1) THEN 'Grand Total:' ELSE COALESCE(pt.Name, 'UNKNOWN') END AS "post_type", SUM(COALESCE(1.0 * p.ViewCount, 0)) AS Views FROM Posts AS p LEFT JOIN PostTypes AS pt ON pt.Id = p.PostTypeId GROUP BY pt.Name WITH ROLLUP