title: compute url rating in the particular time period
body: <p>I am new with hive and SQL. And I have some difficulties with writing of query on hive. The fact is that I need to calculate the ranking of visits to urls on weekend between 08:00 and 17:59 (it is working hours) and between 18:00 and 07:59 (it is free hours). I have data base , which stores userId, timestamp (when user attended the url). And I need to select url, and this two ranking of visits for work hours and free hours on weekend. I don't understand how to do that. I suppose I have to use WHERE to filter data with timestamps which were on weekend. But I don't understand how to compute two ranking of visits.</p>
  <pre><code>Example of the row in db:
  
  1234543 1419638963 site.com
  where 
  userId = 1234543
  unix timestamp = 1419638963
  url = site.com
  </code></pre>
  <p>I would be very grateful for any help!</p>