get summary of related model via STAT relation

Comparing #1 with #3

Content

[...]
```

more in your model:

```php
'itemsMax'=>array(self::STAT, 'Invoiceitem', 'invoice_id', 'select' => 'Max(amount)'), 'itemsAVG'=>array(self::STAT, 'Invoiceitem', 'invoice_id', 'select' => 'AVG(amount)'), ```