title: How to use COLLECT_SET and group by condition in different columns
body: <p>I have this table:</p>
  
  <pre><code>╔═════════╦═════════╦══════════════╗
  ║ user_id ║ item_id ║ date_visited ║
  ╠═════════╬═════════╬══════════════╣
  ║ 1       ║ 123     ║ 18/5/2017    ║
  ║ 1       ║ 234     ║ 11/3/2017    ║
  ║ 2       ║ 345     ║ 18/5/2017    ║
  ║ 2       ║ 456     ║ 11/3/2017    ║
  ╚═════════╩═════════╩══════════════╝
  </code></pre>
  
  <p>What I'm trying to achieve (via Hive query) is this result (assuming today is 18/5/2017):</p>
  
  <pre><code>╔═════════╦═══════════════════════════╦═════════════════════════════╗
  ║ user_id ║ items_visited_last_5_days ║ items_visited_last_100_days ║
  ╠═════════╬═══════════════════════════╬═════════════════════════════╣
  ║ 1       ║ 123                       ║ 123, 234                    ║
  ║ 2       ║ 345                       ║ 345, 456                    ║
  ╚═════════╩═══════════════════════════╩═════════════════════════════╝
  </code></pre>
  
  <p>Basically, I need to group by user_id and generate different columns (based on time intervals) with the user's visits (concatenated item_id). Is it possible to achieve this?</p>
  
  <p>Thank you in advance.</p>