title: Is there any alternative to Vertica's conditional_true_event in RedShift?
body: <p>Vertica has a very nice type of operations: <a href="https://my.vertica.com/docs/7.1.x/HTML/Content/Authoring/AnalyzingData/Event-basedWindows.htm" rel="nofollow">Event-Based Window operations</a>, which basically let you identify when an event occurs.
  For example the conditional_true_event will increment a counter each time the given boolean expression resolves to true.
  We use this kind of approach heavily.</p>
  
  <p>We are thinking about moving to RedShift, but we would need a similar function.
  RedShift has some nice <a href="http://docs.aws.amazon.com/redshift/latest/dg/c_Window_functions.html" rel="nofollow">window functions</a>, but I can't find this one.</p>
  
  <p>Is there any way I can emulate this function using RedShift?</p>