[Question] How to select row with most recent date per user?
Post your questions on stackoverflow or irc. This is the issue tracker.
### Question
Hi, sir.

What's the peewee way, to select row with most recent date per user?

### Input
id | user | val
-- | -- | --
1 | jane | 11
2 | john | 21
3 | bob | 32
4 | bob | 31
5 | john | 22


### Output

id | user | val
-- | -- |  --
1 | jane | 11
4 | bob | 31
5 | john | 22


<details>
  <summary>Prepare Code</summary>
  <p>
 

```python
from peewee import SqliteDatabase, Model, TextField, IntegerField
from playhouse.sqlite_ext import AutoIncrementField

db = SqliteDatabase(
    "./foobar.db",
    pragmas={
        "journal_mode": "wal",
        "cache_size": -1 * 64000,
        "foreign_keys": 1,
        "ignore_check_constraints": 0,
        "synchronous": 0,
    },
)


class Score(Model):
    id = AutoIncrementField()
    user = TextField()
    val = IntegerField()

    class Meta:
        database = db


db.connect()
db.create_tables([Score])
for [user, val] in [
    ["jane", 11],
    ["john", 21],
    ["bob", 32],
    ["bob", 31],
    ["john", 22],
]:
    Score.create(user=user, val=val)

```
  </p>
</details>




<details>
  <summary></summary>
  <p>
 

Maybe keep same order as user field?

id | user | val
-- | -- |  --
1 | jane | 11
5 | john | 31
4 | bob | 22
  </p>
</details>


Thanks.