Let\'s take this table :
id | ownerid | ----+---------+ 1 | 98 | 1 | 99 | 2 | 100 | 2 | 101 | 2 | 102 | 3 | 103 | 3 |