How to check
This isn't really appropriate for GH issues. Try the [peewee mailing list](groups.google.com/group/peewee-orm) or irc (freenode #peewee).
 Since you're stuck, though, you might try something like this:

``` python

(User
 .select()
 .where(fn.Exists(
     Message.select().where(Message.user == User.id))))
```

I'm trying to write a query which should return all names of Users which have at least one message associated with them. My models look like this:

```
class User(db.Model):
    name = CharField()

class Message(db.Model):
    user = ForeignKeyField(User, related_name='messages')
    text = TextField()
```

and I currently try this as follows:

```
usersWithAtLeastOneMessage = User.select().where((fn.Count(User.messages) > 0)
for u in usersWithAtLeastOneMessage: 
    print u.name
```

Unfortunately, this gives me an error saying `OperationalError: misuse of aggregate function Count()`. 

Does anybody know how I can get all users which have at least one Message? All tips are welcome!
