title: Gather/Select rows for calculation
body: <p>My question is embarrassingly simple, but a colleague asked me, and I almost never use Excel. In Mathematica, I can solve this within seconds. Let us assume a very simple arrangement consisting of a patient ID, a year of measurement, and a value:</p>
  
  <p><a href="https://i.stack.imgur.com/Gl67M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gl67M.png" alt="enter image description here"></a></p>
  
  <p><strong>Question 1:</strong> How can I create a new table consisting only of the first measurements? That is, for ID 1 the 2014 row, for ID 2 the 2015 row and for ID 3 the 2016 row.</p>
  
  <p><strong>Question 2:</strong> How can I create a new table that has only one line for each ID and where all found <code>Values</code> are used with a function like <code>MEDIAN()</code>? That is for ID 1 the median of 12 and 23, for ID 2 the median of 32 and 16 and for ID 3 just 4.</p>