title: Fire an event when records exist based on some query
body: <p>I have a table, that people insert records on it (status=0), and other team updates the table (with the frontend) setting status=1.</p>
  <p>I want to have something that can give me an event to perform some task, when records with status=0 are inserted, in that very moment (ok with seconds delay) without using timers and check it every X seconds.</p>
  <p>The query would be something like:</p>
  <pre><code>select count(*) as ok from tbl where status=0;
  </code></pre>
  <p>How could this be made/which technology/functions?</p>