text: ﻿--Table size by distribution type
  --PRE-REQUISITE: must have table info view created already
  --pulled from: https://docs.microsoft.com/en-us/azure/sql-data-warehouse/sql-data-warehouse-tables-overview#table-size-queries
  SELECT 
       distribution_policy_name
  ,    SUM(row_count)                as table_type_row_count
  ,    SUM(reserved_space_GB)        as table_type_reserved_space_GB
  ,    SUM(data_space_GB)            as table_type_data_space_GB
  ,    SUM(index_space_GB)           as table_type_index_space_GB
  ,    SUM(unused_space_GB)          as table_type_unused_space_GB
  FROM dbo.vTableSizes
  GROUP BY distribution_policy_name
  ;