title: How can I remove all rows except the last 20 occurances for a specific value in a column
body: <p>I've got a postgres database collecting MQTT broadcasts.
  One table contains all the broadcast and is growning rapidly.
  The table has a column contaning the unit where the broadcast comes from.
  My table doesn't have any id (primary key), can I assume the first found records are the oldest?
  Now, I want to keep only the last 3 broadcasts, or so, for each unit, i.e. the last 3 broadcast from unit 100, the last 3 broadcast from unit 101 and so on. Is it possible without a id key?</p>
  
  <pre><code>node                namespace               unit          beacondata
  rpi-b827eb5cc1c3    5c8554575f873f8b3054    102           {"json data"}
  rpi-b827eb5cc1c3    5c8554575f873f8b3054    102           {"json data"}
  rpi-b827ebf0ab49    5c8554575f873f8b3054    102           {"json data"}
  rpi-b827ebf0ab49    5c8554575f873f8b3054    102           {"json data"}
  rpi-b827ebf0ab49    5c8554575f873f8b3054    102           {"json data"}
  rpi-b827eb5cc1c3    5c8554575f873f8b3054    100           {"json data"}
  rpi-b827eb5cc1c3    5c8554575f873f8b3054    100           {"json data"}
  rpi-b827eb5cc1c3    5c8554575f873f8b3054    101           {"json data"}
  rpi-b827ebf0ab49    5c8554575f873f8b3054    101           {"json data"}
  rpi-b827ebf0ab49    5c8554575f873f8b3054    100           {"json data"}
  rpi-b827ebf0ab49    5c8554575f873f8b3054    100           {"json data"}
  rpi-b827ebf0ab49    5c8554575f873f8b3054    100           {"json data"}  
  rpi-b827eb5cc1c3    5c8554575f873f8b3054    102           {"json data"}
  rpi-b827ebf0ab49    5c8554575f873f8b3054    101           {"json data"}
  rpi-b827ebf0ab49    5c8554575f873f8b3054    101           {"json data"}  
  rpi-b827ebf0ab49    5c8554575f873f8b3054    102           {"json data"}  
  rpi-b827ebf0ab49    5c8554575f873f8b3054    101           {"json data"}  
  rpi-b827eb5cc1c3    5c8554575f873f8b3054    100           {"json data"}  
  rpi-b827ebf0ab49    5c8554575f873f8b3054    102           {"json data"}  
  rpi-b827eb5cc1c3    5c8554575f873f8b3054    102           {"json data"}  
  rpi-b827eb5cc1c3    5c8554575f873f8b3054    101           {"json data"}  
  rpi-b827eb5cc1c3    5c8554575f873f8b3054    100           {"json data"}  
  </code></pre>
  
  <p>All columns are string except for beacondata, it's json. There are no id or primary key in this table.</p>
  
  <p>Later on there will be hundreds of units an thousands of broadcasts...</p>