hive優化:讓一個MR作更多的事情

經常會有相似這樣的需求: 數據是這樣的 user_id  int      用戶ID         pay_channel int   充值渠道ID pay_cents   int   充值金額 user_id+pay_channel爲惟一鍵 求每一個用戶充值金額最多的渠道。 直觀上有兩種思路: 1. 先求每一個用戶在全部渠道上的最大充值,而後回表join select t1.user_id ,
相關文章
相關標籤/搜索