MAX aggregation for name column

2016-06-23 Thread Hao Chen
Hi, all. given a dimension table: dim_table{ id_column int, name_column string } and a fact table: fact_table{ id_column int, measure int } usually we select with this sql: select dim.id_column, max(dim.name_column), sum(fact.measure) from fact_table as fact join dim_table as dim on

MAX aggregation for name column

2016-06-23 Thread Hao Chen
Hi, all. given a dimension table: dim_table{ id_column int, name_column string } and a fact table: fact_table{ id_column int, measure int } usually we select with this sql: select dim.id_column, max(dim.name_column), sum(fact.measure) from fact_table as fact join dim_table as dim on