here is my problem, i'm developing a web app with Ruby On Rails and I'm stuck on a specific query

I have table `purchase_item` which contains: `user_id`, `item_id`, `amount`, `total, ...`

I want sum of amount and total when `user_id` AND `item_id` are the same.

so here:

```
@purchase_items = PurchaseItem.all
@purchase_items = ?

```