title: Mysql sum reputation this month and select 2 other lower results before my result and 2 other higher results
body: <p>I am trying to calculate user's reputation for this month and then to find 4 nearest other results (2 are lower and 2 are higher) so at all to find 5 results at a sequence.
  For example the reputation for certain user is 4500 so I should get at the end results: 2750, 3000, <strong>4500</strong>, 4650, 8900</p>
  
  <p>This is the query I am having (it only selects for the certain user his reputation in the current month): <code>SELECT SUM(reputation_change) FROM activity WHERE user_id = '1' AND YEAR(datetime) = YEAR(CURDATE()) AND MONTH(datetime) = MONTH(CURDATE())</code></p>
  
  <p>My table is as following:
  <img src="https://i.stack.imgur.com/cw1dU.png" alt="enter image description here"></p>
  
  <p>So the question is: how to make this to be performance-fair? Don't I have to restructuralize table and to add just for each user column <code>reputation_this_month</code>?</p>
  
  <p>Thanks for all your suggestions.</p>