title: AWS Timestream - MAX_BY/MIN_BY get latest when multiple values returned by function
body: <p>Typically, using MAX_BY or MIN_BY with time returns a single value (as time is unique in the series).</p>
  <p>However, in the case that you use either of these functions with something other than time you may have multiple values (if the column contains non-unique values). The default behaviour of these functions is to return the desired data from the <em>first minute</em> that satisfies the condition.</p>
  <p>My question is how do you get the <em>latest minute</em> that satisfies the condition?</p>